What you’ll learn.
What is a JPEG file?
Joint Photographic Experts Group (JPEG) files are one of the most common ways to store digital photos. Many modern cameras use them to shoot and store images. JPEGs go through a compression process to significantly reduce the image file size — making them easier to store and load on webpages. JPEG images can contain up to 16 million colors.
Learn more about JPEG files
What is a PNG file?
Portable Network Graphics files (PNGs) are compressible and like JPEGS, can handle 16 million colors. They’re mostly used for web graphics, logos, charts, and illustrations, rather than high-quality photographs, because they take up more storage space than JPEGs. One thing PNGs offer that JPEGs don’t is the ability to handle graphics with transparent backgrounds.
Learn more about PNG files
What is the difference between JPEG and PNG files?
Despite their similarities and widespread use, there are many differences between JPEG and PNG files. Because of their different compression processes, JPEGs contain less data than PNGs — and therefore, are usually smaller in size. Unlike JPEGs, PNGs support transparent backgrounds, making them preferred for graphic design. Find out more differences below:
Lossless vs. lossy compression.
It’s important to understand the different compression processes each file type uses when considering whether to use JPEG or PNG as your file type.
JPEGs are designed to efficiently store high-quality digital photos packed with detail and color. They compress large images into much smaller file sizes, making them easier to share and upload online. But this comes at a price.
JPEGs use a lossy compression process — meaning some data from the image is permanently deleted when it’s made smaller. This could compromise the quality of your file in the long term because each time you edit and save it, you lose more data. Because of this, some professional photographers prefer using uncompressed raw files.
In contrast, PNG files benefit from lossless compression. This means no data is lost when the image is compressed — the quality stays the same no matter how many times you edit and save the file. The image won’t become blurry or distorted, making PNGs ideal for sharp logos and graphs containing lots of figures.
Disadvantages of DWG files.
They may compromise on quality with their lossy compression, but JPEGs can crunch large images down into more manageable file sizes. This is helpful if you don’t have a huge amount of disk space to play with — and can speed up page loading times, too.
The trade-off with PNGs is that their lossless compression creates bigger files, since they retain much more information. They’re generally larger than JPEGs and GIFs, use up additional storage space, and potentially slow down the responsiveness of web pages.
One of the major differences between JPEG and PNG files is their ability to handle transparency in images.
JPEGs don’t support transparent backgrounds. Non-rectangular logos and graphics featuring lots of text are unlikely to work well in this format as a result. JPEG images will also struggle to blend seamlessly with web pages that feature different background colors.
PNG files, on the other hand, do support transparency. Web designers can apply transparent backgrounds to their images – and even different degrees of transparency. It means PNG images integrate better with different background colors on a page and text is easier to read.
Digital photos vs. web graphics.
JPEGs are hugely popular with photographers and businesses that manage large image libraries. Their smaller file size allows multiple digital photos to be shared and downloaded simultaneously. By making efficient use of storage space, JPEGs can keep an image library relatively streamlined, with no long wait times for files to open.
Given their widespread usage, JPEG files are viewable and editable across a vast array of operating systems and programs — so you’re unlikely to need specialized software to work on them.
In comparison, PNGs aren’t really built to store high-quality photos. They specialize in handling detailed, high-contrast web graphics. They’re often the default format for screenshot images since they can provide a highly accurate representation of your desktop and don’t compress pixels together. A huge color palette and lossless compression ensure they retain plenty of detail — making them a popular choice for illustrations and charts.
The ability of PNGs to handle transparent images also gives them an edge over JPEGs when designing logos. For example, you can create a company logo with a transparent background, then seamlessly layer it on top of other images or webpages.
As with JPEGs, you can open PNGs in many programs and web browsers. PNGs were specifically designed to be an upgrade on the older GIF format — meaning they’re patent-free and offer a much broader choice of colors.
JPEG vs. PNG files: frequently asked questions.
Do JPEG or PNG files support animation?
No, neither JPEG nor PNG files supports animated images. GIFs allow for basic animation, making them a popular choice for memes on social media platforms. Animated GIF files can hold multiple images or frames at the same time, which provides a video-like effect. But they tend to be short with low resolution.
Are JPEGs and PNGs raster or vector files?
JPEGs and PNGs are both types of raster image files. This means they’re made up of a fixed number of color pixels — rather than the grids, points, and mathematical formulas used in vector files. Raster files allow plenty of detail to be displayed but lose their resolution when significantly resized.
Are JPEG or PNG files compatible with CMYK?
PNGs don’t support CMYK color modes since they’re designed more with the web in mind, rather than printing. JPEGs generally support RGB over CMYK. You may struggle to open CMYK JPEGs due to a lack of compatible programs — so they tend to be quite rare.
Do size limits apply to JPEG and PNG files?
A maximum width and height of 65,535 pixels applies to JPEG images, which is worth considering when storing highly detailed pictures. The dimensions for PNG files are unlimited in theory, but in practical terms you’ll be limited by factors such as memory space and the software you’re using to view the file.
Is EXIF data from cameras supported by JPEG or PNG?
PNGs can’t embed the EXIF data that digital cameras use to list a photograph’s key details. However, JPEG files can store and display this data, which can include things like the shutter speed and focal length used to take a particular photograph.