There are many different image formats available. While that gives us a lot of flexibility in finding a format that’s a good fit for an intended use, it’s not always clear what the best one to use is.
So my aim here is to provide some quick, concise guidance to try to demystify which image file format to use when. And, being a photographer, I’m focusing mainly on the types of image formats that photographers use in day-to-day, whether that’s with shooting, editing, and sharing their photos or in maintaining their website. Animators and graphic designers have different needs and preferences, so they’re likely to routinely use a different set of image file formats in their work. Photographers don’t have much routine use for image formats like Targa or EPS, for instance.
So I’m not trying to provide a laundry list of all image file formats. And these are by no means absolute rules, and there are always exceptions. My objective here isn’t to say that you should be using this or that. If you’ve got a good system that works for your workflow, great! But I’m focusing here on some best first choices for common uses, and I hope it’s useful to anyone looking for some quick guidance.
There are a couple of rules of thumb to bear in mind.
- For your original master version, save it in the largest size and best quality that’s practical. You can easily reduce the size for a derivative version you share, but you can never truly recover detail that’s deleted if you downsize (despite what you see in some TV shows and movies).1
- Use the highest quality setting and file size that’s practical. This often involves some kind of compromise. Uncompressed TIFF and RAW files offer the best quality, but the files are very big. If storage space isn’t an issue, have at it. But your friends, family, and email provider aren’t going to be happy with you if you’re constantly trying to send them 100MB TIF snapshots. That’s why there are other file formats that are more practical for that kind of thing.
Common Image Files Formats
JPG / JPEG
This has become the most common digital image file format that you run into. It’s universally compatible, and it offers decent compression to keep filesizes low while retaining image quality. They’re good for photos, general-use graphics, and they have provision for text metadata, so you can embed information such as location, copyright, camera details, and so on.
Best uses: General everyday image format / photos / websites / sharing images online or by email
HEIC / HEIF
This is a relatively new format, but you see it commonly used by the cameras on newer iPhones and smartphones. You can think of it as a newer, better JPG. It uses a more efficient compression algorithm that creates small files than JPGs while retaining equivalent image quality. It also has built-in support for features like motion graphics and great bit depth than JPG images. The catch with HEIC / HEIF files–at least, for now–is that they’re not nearly as widely compatible as JPGs. (I’ve put together some guides on how to convert HEIC to JPG and also how to disable HEIC on iPhone.)
Best uses: Until HEIC gains more compatibility traction, HEIC is best limited to the file format used with your phone’s camera.
TIFF / TIF
TIFF files are typically much larger in filesize than JPGs. They’re a good format for master copies that will stay on your computer. But they’re not suitable for everyday sharing or posting on a website–they’re just too big for that. There are variations for lossless compression (ZIP and LZW) that help with the file size, but they still won’t get anywhere close to the file size reduction that JPGs can. There’s provision for metadata as well as layers, making them a good option for image editing. There are variants that offer a good way to share multi-page black and white text scanned documents. In photographic terms, there are 8-bit and 16-bit TIFF files commonly in use; 16-bit TIFF files offer vastly more colors available and therefore offers the maximum image quality for master copies of photos, but the file sizes are extremely large (even with ZIP compression–never use LZW compression with 16-bit TIF files).
PNG took over from GIF as a web-friendly format for graphics and illustrations with fairly simple tonal values. They’re lightweight (i.e., small file size), so they’re especially good for things like company logos on websites.2 One of the key features of PNG is that there’s provision for transparency (or alpha), meaning that you can keep a transparent background. There’s no provision for adding text-based metadata. And, unlike GIF, PNGs aren’t compatible with animation. And there are commonly 8-bit and 24-bit PNGs. Of those, the more common you see in day-to-day use are 8-bit PNGs, which have up to 256 colors; 24-bit PNGs share many of the same features as 8-bit PNGs but have vastly more colors available. But while 24-bit PNGs can be used for detailed photos and still retain image quality, minimally compressed JPGs or TIFF files are nearly always a better option.
Best uses: Website graphics and illustrations.
RAW files are created by digital capture devices such as cameras and scanners. They’re designed to preserve all of the data captured by the sensor. That leads to two key things: the files are generally much larger than JPGs, and RAW files aren’t suitable for sharing without processing in specialized RAW processing apps. In some ways, you can think of a RAW file like an old film negative–you need to do something with it before you show it to someone.
Of all the file formats here, RAW is the least standardized. That’s because camera manufacturers adopt their own proprietary versions. While RAW formats haven’t quite devolved into the Wild West of early fears, there’s still a proliferation of formats used, with different manufacturers adopting their own versions, often locking off part of the data into proprietary segments. Nikon uses NEF or NRW. Canon uses CRW, CR2, or CR3. Sony uses ARW, SRF, or SR2. Panasonic/LUMIX uses RAW or RW2. Fujifilm uses RAF. GoPro uses GPR. And so on.
Adobe developed their own RAW format known as DNG. It’s designed as a versatile common RAW standard. Some cameras use it directly, including the latest generations of Apple iPhones that can save in Apple RAW. With other formats, it’s possible to convert them to DNG either by a standard conversion (some proprietary metadata might get lost in the process) or by embedding the original RAW file inside the DNG container. It’s a valid debate whether DNG is truly an open standard when it’s still ultimately controlled by a large for-profit company, but it’s the closest thing we currently have to a broadly compatible and future-proof RAW format.
RAW formats vary widely on whether or not they use lossy compression, lossless compression, or no compression. Some might be 12-bit; others might be 14-bit. Not all cameras give you the option to save RAW files, but most medium- and high-end cameras these days offer the option. Higher-end models generally give you choices on whether to use compression when saving the file and how many bits are used.
Best uses: Capturing photos with maximum image quality.
Other Common Formats
Here are some other formats that you might come across in day-to-day use.
- SVG: A vector file format best used for graphics and logos on a website.
- WebP: Often shown in place of JPGs or PNGs on websites (if you right-click to download an image from a website, it might save as a .webp, for example). Considered a next-generation image format and exclusively designed for websites.
- AVIF: An even newer format than WebP with similar use intent. But more efficient than WebP and intended to replace WebP, JPG, PNG, and GIF on the web.
- JPEG2000: It has actually been around for quite some time, but it never really gained traction. It has had something of a revival more recently as a potential web-friendly image format, but adoption is limited for now.
- GIF: An old standard for graphics before PNG came along. Retains relevancy for its unique support for lightweight animations on the web.
- PSD: A format used mainly by Photoshop. Best used when editing photos in Photoshop because of editing-friendly features such as support for layers.
- PDF: Designed for sharing documents, and never really intended to share images, but you still find it commonly used as a universally compatible way to share batches of images in a single file with multiple pages.
- DOC: A format created by Microsoft for MS Word documents, it is not an image file format, as such. But I still find it amazing (and it’s a pet peeve of mine) how often people use it to share images by embedding multiple photos within one document. The good news is that a DOC file is basically a container, and it’s possible to extract the original images from that container.
Which Image File Formats Are Best For . . .
Emailing Photos to Friends & Family
JPG (or JPEG–they’re the same thing). If they’re just looking at the photo on a screen like a phone or computer, you can usually get away with quite a bit of compression. That will keep the file size smaller while still looking good. Start with a quality setting of around 60. Pixel dimensions of around 2000 pixels on the longest side should be plenty sharp enough for most uses, including iPads and laptops.
Other options: Some newer phones are now using a new format known as HEIC. These offer very good image quality at even smaller file sizes. The catch is that they’re not as compatible (for now), and there’s a risk that some users won’t be able to open the file. (I’ve put together some guides on how to convert HEIC files to JPG.)
Sending Photos to a Print Lab
Good: JPG (most compatible and most common)
Better: TIFF (not all photo labs accept them)
JPG. Send the largest pixel dimensions you have. The lab will reduce it to fit if it’s too large, but sending a file that’s too small risks losing detail and sharpness. And use minimal compression (i.e., a very high quality setting of at least 80).
Other options: While many online photographic lab services now recommend sending JPGs–and some only accept JPGs, especially for multi-image products like photo books–there are still some high-end labs that let you send uncompressed TIF files to make prints. If that option is available, it’s also a good way to do it, because it maximizes the quality. But you’ll be working with much larger files that will take longer to upload. There’s also an increased risk of compatibility issues; there are various settings available when saving TIFF files, and not all of them might be compatible with the print lab’s software (e.g., 16-bit vs 8-bit).
Taking Photos With a Camera
Good: JPG (most convenient)
Better: RAW (highest image quality)
What options you have available here will depend on the camera you’re using. All digital cameras will give you the option of saving JPG files. That’s the simplest option and gives good image quality. High-end cameras will add the option of saving RAW (and some offer TIF as well). And there are even flavors of RAW files. But if you’re at the point of deciding between 12-bit and 14-bit RAW file formats, that’s a topic for a more specialized post than this.
In general, the choice between RAW and JPG comes down to quality vs convenience. There’s a lot more that can be said about it, and photographers can debate it until the cows come home, but that’s really what it comes down to at its core.
- RAW files allow for maximum quality, but they require processing in an image editing app (or, more precisely, a RAW processing app) before they can be shared or used.
- JPG files are far more convenient because they’re universally compatible, usually manageable file sizes, and don’t require post-processing to share or use.
Many smartphones and tablets can also shoot photos and save them in a newer format known as HEIC. You can think of that as a newer evolution of JPG in that it’s designed for compressed files for sharing and uploading rather than archiving master copies. But HEIC hasn’t yet filtered down into other types of cameras such as compacts, mirrorless, or DSLRs (at least, not yet).
Using Photos & Images on a Website
Good: JPG / PNG (most compatible)
Better: JPG / PNG + WebP (faster speeds / better for website optimization)
More than most of the categories here, this one is a moving target. That’s because web standards are constantly evolving and prone to fairly rapid improvement and shifts.
The safest option right now is to use JPG for photos and high-detail images and PNG for graphics or illustrations.
But if you’re looking to optimize your website’s speed (or trying to satisfy Google’s new Core Web Values), there are newer, more-optimized file formats. In web-optimization jargon, these are considered “next-generation image formats.”
For now, the one with the most traction is WebP. In general (and with the right settings), WebP images have a smaller file size than corresponding JPG and PNG versions while maintaining equivalent image quality. But because WebP is not universally compatible, in practical use, it usually means your website has to have both WebP versions and the original JPG or PNG version. A website that only uses the WebP file format for all visitors is likely to be unreadable to some visitors. So it’s not really a case of JPG or WebP but JPG plus WebP.
Setting your website up to serve WebP images is more complicated than it should be and involves first creating the WebP versions and then serving them to compatible browsers. That’s all well beyond the scope of this post, but I have put together some guides to creating WebP images separately.
Other formats which so far have less traction (i.e., more limited compatibility) include JPEG2000, JPEG XR, JPEG XL, and AVIF.
Archiving Family Photos
When archiving photos that have value–whether that value is real monetary value or emotional value–you generally want to save the highest, least-compressed quality possible. That said, practical considerations still play a role. If you’re scanning old family slides, for instance, a high-resolution scan can easily spit out 16-bit uncompressed TIF files that come to a couple of hundred megabytes each. But for most purposes, that’s excessive, if only for the data storage issues that arise if you’re talking about hundreds or thousands of photos. So it’s important to strike a balance.
In general, when archiving scans or other family photos, some good rules of thumb are:
- Archive the original version rather than a derivative version. That reduces the risk of quality degradation with new versions. (An exception can be in converting manufacturer-specific RAW files to the more transparent RAW format of DNG).
- Adopt a long-term view of file formats to avoid compatibility issues in the future. You want to be able to open the photos in 20 or 30 years (or more) time. You don’t want all your photos stuck in the photographic equivalent of Betamax. Some file formats come and go; others stick around longer. While no-one has a crystal ball to know for sure where things are headed, some formats like TIF or JPG have a proven record of sticking around for the long haul (at least, so far!).
- Create multiple backups on different media and keep them in different physical locations. The long-term archiving of digital media is one of the great challenges of the digital age. It’s too easy to accidentally delete a file. Hard drives file–it’s not a matter of if, but when. Digital storage media like DVD-ROMs are susceptible to something known as bit rot (yes, that’s a thing). Cloud backup companies close up shop suddenly. And that’s before you get to all the usual challenges of houses burning down or boxes getting accidentally thrown out. Reliable backing up of digital photos is way beyond the scope of this post, but creating multiple copies is a crucial first step.
Common Image File Formats
Here are some of the more common image file formats you might run into. This is by no means an exhaustive list, and I hope to update it periodically.
|Format Name||File Extension||Notes|
|3FR||.3fr||RAW image file format used by Hallellad cameras.|
|ARW||.arw||RAW image file format used by Sony cameras.|
|AVIF / AV1||.avif||A new image format that uses more efficient coding algorithms for smaller file sizes while retaining equivalent image quality. Regarded as a next-generation image format for the purposes of web optimization but is still not widely compatible.|
|BRAW||.braw||RAW image file format used by Blackmagic Design cameras.|
|CAP||.cap||RAW image file format used by Phase One cameras.|
|CR2||.cr2||RAW image file format used by Canon cameras.|
|CR3||.cr3||RAW image file format used by Canon cameras.|
|CRW||.crw||RAW image file format used by Canon cameras.|
|DCR||.drc||RAW image file format used by Kodak cameras.|
|DCS||.dcs||RAW image file format used by Kodak cameras.|
|DNG||.dng||A RAW image file format developed by Adobe and designed as an open standard. Other RAW formats can be converted to DNG using Adobe DNG Converter, and some cameras use DNG natively.|
|EIP||.eip||RAW image file format used by Phase One cameras.|
|EPS||.eps, .epsf, epsi||A postscript graphics file format most commonly used for printing and graphic design.|
|ERF||.erf||RAW image file format used by Epson capture devices.|
|GIF||.gif||An early bitmap image format widely adopted in web use. Has a color palette limited to 256 colors, supports transparency, and also supports simple animations. Generally superseded by PNG except in the cases of animations and memes. Pronunciation has been subject of long-running debate, but creators intended it to be pronounced with a soft "g" as in "jif."|
|GPR||.gpr||GoPro's custom RAW format built on the foundation of DNG. Used only by GoPro cameras and has limited compatibility. Lightroom is one of the few apps that can open GPR files.|
|IIQ||.iiq||RAW image file format used by Phase One cameras.|
|JPEG / JPG||.jpeg / .jpg||The most dominant image format in everyday use. Offers universal compatibility, good compression, and metadata. A staple of consumer cameras.|
|JPEG 2000||.jp2, .j2k, .jpf, .jpm, .jpg2, .jpm, .j2c, .jpc, .jpx, .mj2||An image format that uses more efficient coding algorithms for smaller file sizes while retaining equivalent image quality. Regarded as a next-generation image format for the purposes of web optimization but is still not widely compatible. Also used in video compression.|
|JPEG XS||.jxs||Next-generation image and video coding system especially well suited to VR and gaming.|
|K25||.k25||RAW image file format used by Kodak cameras.|
|KDC||.kdc||RAW image file format used by Kodak cameras.|
|MDC||.mdc||RAW image file format used by Minolta and Agfa cameras.|
|MEF||.mef||RAW image file format used by Mamiya cameras.|
|MOS||.mos||RAW image file format used by Leaf cameras.|
|MRW||.mrw||RAW image file format used by Minolta cameras cameras.|
|NEF||.nef||RAW image file format used by Nikon cameras.|
|NRW||.nrw||RAW image file format used by Nikon cameras.|
|ORF||.orf||RAW image file format used by Olympus cameras.|
|PEF||.pef||RAW image file format used by Pentax cameras.|
|PSD||.psd||Image file format natively used by Adobe Photoshop and designed to support Photoshop's features (eg. masks, layers, etc).|
|PTX||.ptx||RAW image file format used by Pentax cameras.|
|R3D||.r3d||RAW image file format used by RED cameras.|
|RAF||.raf||RAW image file format used by Fujifilm cameras.|
|RAW||.raw||In general use, RAW refers to a category of image file formats that captures and saves all of the data captured by the digital sensor. The .raw file extension more specifically, though, is a format used by Panasonic/Lumix and Leica cameras.|
|RW2||.rw2||RAW image file format used by Panasonic/Lumix cameras.|
|RWL||.rwl||RAW image file format used by Leica cameras.|
|RWZ||.rwz||RAW image file format used by Rawzor cameras.|
|SR2||.sr2||RAW image file format used by Sony cameras.|
|SRF||.srf||RAW image file format used by Sony cameras.|
|SRW||.srw||RAW image file format used by Samsung cameras.|
|SVG||.svg||A vector graphics format that can be scaled without any quality loss. Typically used for logos and graphics on the web; not well-suited to photographs.|
|TARGA||.tga, .icb, .vda, .vst||An early digital image file format widely used in graphics, illustrations, and animations.|
|TIFF / TIF||.tiff, .tif||A raster graphics format that's widely compatible and suitable for storing master copies of photographs, scans, and documents. Preserving the high quality of the image data, though, means that the files are too big to be practical for most web use.|
|WebP||.webp||Developed by Google as an image format for web use. Uses a more efficient algorithm than PNG or JPEG images to provide smaller file sizes with equivalent image quality. Includes both lossless and lossy compression as well as transparency. Considered as a next-generation image format for the purposes of website optimization.|
|X3F||.x3f||RAW image file format used by Sigma cameras.|
- There are some excellent uprezzing apps available that let you increase the file size and give the perception of improving detail. And they definitely have a useful place in a photographic workflow. But the key word is “perception,” and it’s not a way to magically restore an image to its former glory. ↩
- In recent years, vector format SVG is often preferred as a lightweight, scalable option for logos on websites. And WebP offers even more compression benefits. ↩