Everything You Need to Know About the JPEG Image Format


One of the more common questions that new photographers ask is, how many pictures can I fit on my memory card? There are two answers to this, the easy one, which is to quote a specific number or the accurate one. The accurate answer is, there is no way of telling. The reason this answer is not often used is because explaining it can be complicated. Its complication stems from the fact that the most popular image file format used by photographers today, is of course, the JPEG, and JPEG files rarely have a fixed file size. Today we are going to attempt to explain the mysteries of the JPEG and why it is important to understand them.

What is JPEG?

The name JPEG, often abbreviated to the tune of one letter to JPG is an acronym for Joint Photographic Experts Group and has a history that reaches all the way back to 1992. JPEG is a standard that defines how an image is compressed into bytes and re-translated back into a usable image. The RAW data from a camera’s sensor, or indeed any digital imaging device contains huge amounts of data. Although we now routinely shoot RAW files, in the early days of digital imaging there was often nowhere near enough storage space or processing power to store these relatively huge images. For this reason, the JPEG file was born, as a way to dramatically reduce file sizes and allow cameras to process images in real time.

JPEG File Size Varies With the Scene You're Photographing

So why can you not work out how many Jpeg images will fit on a 16gb memory card? Well, if you were shooting RAW files, this figure would be pretty easy to work out. That is because the data for each file is pretty much identical. However, when you shoot a JPEG, as we have said the image is compressed. It is the way the image is compressed that can give us drastically different file sizes. JPEG compression basically works by eliminating the small differences in color and brightness that are indiscernible to the eye and keeping the most important data.

To put this in perspective, let’s imagine you took a picture that included a huge amount of uniformly blue sky. Because much of the color and brightness is very similar, the JPEG algorithm, would be able to compress that data into a very small file size, eliminating a lot of irrelevant data. Now, if your next shot was to be, for example, a forest scene in autumn, you would find that the file size would be much larger. This is because the scene would have large and complicated variations in both color and brightness. The JPEG algorithm would not be able to find much data to discard. So while you blue sky shot may only be 1.5MB on your card, the autumn forest may well be double or even more the size.


These two images are resized to the same dimensions. Because the upper image is much cleaner and simpler, its file size is 473kb. The lower image by contrast is 1.1Mb in file size

JPEG Image Quality and File Size

The other useful thing to know about JPEGs, is that we have control over how much they compress the image. In our cameras, you will find that under the image quality settings for JPEG, we have will have FINE, NORMAL, and BASIC. These define how much compression is applied to an image when it is saved to the memory card. In reality, these settings would be better served by using the worlds, HIGH, NORMAL and LOW quality, but no camera company is going to suggest it’s camera is capable of taking low-quality images.

The FINE quality will apply the least compression to an image and the BASIC quality the highest compression. Unless you are extremely restricted by storage space or have a very old computer, there is really no reason to use anything less than the FINE setting for compression. Incidentally, if a photographer tells you he only ever shoots RAW, you can gently remind him that that is not entirely true. The image he sees on the camera’s LCD screen, is a JPEG preview file that is embedded into the RAW file. So in reality he always shoots both RAW and JPEG.

Editing and Saving JPEG Files on Your Computer

Another area that can cause confusion is what happens when you copy your JPEG files to a computer. Some people think that the act of copying the files can compress them further. This is not the case. When you copy the files from your card to computer or to different locations, you copy the entire intact JPEG file. However, if you open that JPEG in a photographic editing app, then save it again as a JPEG, you are applying further compression to the image. It is for this reason that you should always shoot your JPEGS in the FINE mode, the better the quality of the original image the more you can work with it. When editing JPEGs, in post production, you should always work on a copy of the original, not the original itself.

Jpeg Scale
The Jpg compression scale goes from 0 – Highly Compressed to 12 – Minimal Compression

When you come to saving images in post production, you will find that you have even more control over the amount of compression applied. Most software allow you to select a JPEG compression rate between 0 and 12, with 12 being the highest quality, lowest compression and hence the largest file size. If you are optimizing an image for the web, you might use a compression of around 4-5 and if you're going to print, a higher quality or 11-12 would be preferable.

Effect of Compression
The effects of high compression can be seen when looking close at an image

JPEGs can seem to the beginner to be a daunting subject. In reality for most photographers need, the rules are simple, shoot the highest quality, lowest compression in camera, work only on copies of originals in post production and decide on which compression for the final image based on what it will be used for. Keep those rules in mind and you will get along just fine with JPEGs.

About Author

Jason has more than 35 years of experience as a professional photographer, videographer and stock shooter. You can get to know him better here.

I disagree with you when you say if a photographer says he just shoots raw he is actually shooting both raw and jpeg. While the raw data can’t be viewed on the camera’s display, and yes it does let you view your image by converting it to a jpeg, we are not actually shooting in both formats. This is an in camera operation only. There is no trace what so ever after the fact of a jpeg ever being captured.

Great article though, keep them coming.

Actually, nobody ever shoots JPEG…every single picture ever taken was shot RAW. JPEG is a process aplied to the RAW after it was shot.

Strangely enough the person who only shoots pegs actually shoots in RAW as well. In fact no camera shoots in anything other than RAW.

It’s not true that RAW files are a uniform size either. I have a Nikon D750 and only shoot RAW. My fille sizes vary anywhere from 28 – 38 mb’s depending on subject matter in much the same way a JPEG does.

Leave a Reply

Your email address will not be published. Required fields are marked *