Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Another universal file format used for web graphics is JPG. In fact, JPG is quite interesting, because it can be used for both for low resolution and also high-resolution graphics. In fact, one of the main reasons why JPG was originally created was that photographers who have traditionally very large files sizes can transmit those large files across the network or over the web, but yet still maintain high quality images. Now one of the most important things to realize about the JPG format is that it's something which we call a lossy format.
In other words, in order for a computer to take a regular file and reduce its file size to be smaller, it goes through this process called compression. Different file formats use different various ways to compress the files to save file size. For example, the GIF file format looks for solid areas of color and reduces the number of colors to save space in the file size. However, a JPG does something a little bit different. It looks in an image and an image normally has a tremendous amount of detail inside of it, and it tries to identify areas in the image or maybe that detail is not as important.
Maybe it's in shadow areas or highlight areas that are kind of blown out and by analyzing a photograph that basically throws out that extra detail from the image. This reduces the file size; in fact, you can do so sometimes dramatically. However, it does so at the expense of losing detail inside of the image and here's an important thing to note as well. If you have an image that you save as a JPG and then you take that JPG file and you save it again and then you take that JPG file and you save it again, each time that you save the file it's throwing out more and more information.
It's kind of like taking a photocopy of something and then making a photocopy of the photocopy and doing that several times. Each time you make a copy, the quality of those copies get worse and worse. However, in our case here inside of Illustrator, most likely it's kind of a one-way street. We take our artwork that's already inside of Illustrator and we export it once as a JPG file. If we are unhappy with that JPG file or if something needs to change, we rarely open up that JPG file again. We go back to our Source file in Illustrator and create a whole brand-new JPG file.
Still, it's important to understand what the settings are for JPG files. So let's now take this exact same file here, the page design, that AI file, choose File > Save for Web, and I'm now going to choose the JPG file format. Let's start up with just the logo that's right there. I'm going to click on the logo with the Slice Select tool and choose here JPG for the file format. I want to do this because I want to show you why the JPG file format does not work very well for images that use flat color. For example, like this logo right here.
Now when I saved this file previously as a GIF file, it came in somewhere a little bit above over 8K in file size, but as you can see here, right now this JPG is a little bit over 17K. So it's much larger. In fact, it's over double the size. But you can see that when you choose a JPG file, you have a variety of different options for how much you want to compress that file. If you have maximum over here, maximum compression, what that really means is that we want to think about maximum quality. So that means that the higher setting that I choose here.
If I choose Maximum, for example, that means that the quality of my image will be set to the maximum, but I won't get as good as the compression rate, meaning my file size will still stay large. In fact, if I choose Maximum right now, you see that my file size kicked up all the way over 45K. Obviously, the image looks great compared to the one that's over here, but at the expense of having a really large file size. So if you want to reduce the file size you may take this compression setting, and maybe set it down to Medium, but when I do so, I'm going to zoom in over here just a little bit so you can actually kind of get a better idea of what's happening.
You can see what's happening with the compression. One of the problems with the JPG is that when it does this Lossy compression, when it throws out information, I start to see artifacts in areas of color. So you can see over here by the sun, I can see all these artifacts right here, especially in the white areas also. I'm seeing around the text here some really, really bad artifacting that's happening inside of the file. Now if you remember with the GIF file I wasn't seeing that at all, and even with this really bad quality that I'm seeing, I'm still not close enough to the actual file size that I was able to get with the GIF file.
So this is one of the reasons why working with JPEGs doesn't really work that well for areas of flat color. However, when dealing with photographs, well, that's a whole different story. So I'm going to switch to my Hand tool over here and let's kind of move around over here to the photograph itself. I'm actually going to go ahead and use my Slice Select tool and click on this slice to activate it and I'm going to switch now to the JPG file format. Notice right now that my slice is set to the Maximum size, but I'm going to go to the High size, for example. You can start to see a little bit of artifacts around just the edges of the body shape of the silhouette right here, but for the most part I'm still seeing beautiful color and transitions throughout the rest of my image.
Notice the file size now drop down to 26K. If I zoom out just a little bit here so you can see the whole image, when I compare to this one, it looks pretty good. I can even go maybe go down to the Medium setting here, and the image still looks great and I've now just reduced that to 13K. This is the real benefit of using JPG files, because JPG does not have the limitation of working with just 256 colors. Now because you are going to have so many different colors there, you can get beautiful transitions and smooth transitions and a tremendous amount of detail inside of your images.
So obviously when working with photographs, JPG is the way to go. This also applies when you're working with gradients. If you have maybe a gradient background or something, because you want to ensure that smooth tone of that transition of color, you might want to think about gradients or gradient mesh inside of Illustrator as if it were a photograph. In those cases JPG would also be the best file formats to use. Now there are a few other things that you can do for your images here when you're saving a JPG file. You can see over here there's a Quality setting. Notice that when I choose High, the quality setting is set to 60. Really these two are tied together.
These are just presets that exist for different numbers, but if you wanted to kind of experiment, you're really kind of happy with the image in general, but you might be want to kind of do a little bit of tweaking. You can make it 65 Quality, and that would give you something maybe a little better to work with. In addition, you can choose a Blur setting which when you do have a lot of artifacts, sometimes you really don't have a choice. You have a bad image to begin with. You're seeing some artifacts inside of your image. If you apply a slight Blur setting, the Blur setting will actually kind of start to blur out those artifacts and true, maybe you'll lose some overall quality of image as a whole and it might appear a little bit more blurry, but you won't see the artifacts.
Ultimately you just want to make sure that as a designer, you are making that decision and not the browser. Finally, you have the ability to set a Matte setting, but I'll be honest with you. I really don't even know why this setting is here. The Matte setting is important when I have non-rectangular edges, which may happen when I have transparency inside of an image. However, there's no capability for applying a transparent color or background inside of a JPG image. A JPG will always be rectangular in shape, meaning it will always match up perfectly to any background color that it's set to.
But hey, maybe Adobe is aware of something that I'm not and that's why they put this setting in here. So these are the settings for JPG files. Remember, they're always best for working with photographic images or continuous tone images, like things like gradient mesh or gradients, but you want to avoid using JPGs for things like text or things that have solid colors like logos.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.