Movavi Photo Editor

  • Image restoration with neural networks

  • Effective object and background removal

  • Automatic photo enhancement in one click

  • User-friendly interface with tips

PNG vs. JPG

Edited by Ben Jacklin
30,313

Although GIFs are occasionally still used when an animation is needed, almost all of the pictures on the web now are either in JPG or PNG format. These two formats both represent the best in quality and size tradeoffs that make them perfect for web images. Of course, your use of them is not limited to the web. They are great all-around formats for a variety of use case scenarios. In this post, we'll take a deep dive into the two formats and give you the tools you need to decide when to use PNG vs. JPG by explaining the strengths and weaknesses of each format.

Disclaimer: We use affiliate links to the products mentioned on this page. When you click an affiliate link and make a purchase, we receive commissions. If you want to support our portal, you can use the links. Otherwise, you can find the recommended products using a search engine.

JPG vs. PNG

Lossy vs. lossless compression

In order to understand the difference between JPEG and PNG, we must first understand the difference between lossy and lossless compression. With a few exceptions, all images formats are compressed in some way. An uncompressed image could contain up to 32 bits per pixel. With images now measuring millions of pixels, the file size can get huge very fast. It is especially important for web use that these images are not sucking up massive amounts of bandwidth and taking forever to load when a customer visits a site. Of course, smaller file sizes also keep our hard drives from filling up on us too fast.

There are two main ways to compress a file. Lossy and Lossless. These two methods make up the heart of the difference between PNG vs. JPEG. Lossless image compression shrinks the file without any loss in quality. This means reduces the amount of compression that can take place but makes it unnoticeable to the end-user. For instance, an image optimizer like Imagify would easily reduce your images size without sacrificing their quality. If we want to take the image size down even further, we must use lossy image compression. A lossy image compression algorithm will, as the name implies, lose some of the image data during the compression process. By intelligently discarding some of the data, the image size can be reduced much further than a lossless compression format would allow for.

You've probably guessed by now that one of these formats is lossy and one of them is lossless. Now that you understand the two main types of compression, let's see how this relates to choosing between PNG or JPG the next time you need to save an image.

JPEG

The older of the formats, JPEG is a lossy format. It was first introduced back in 1992 and has its roots in methods that date all the way back to 1973. It works by using the knowledge that our brain discards certain high-frequency information and intelligently discards that information from the image. Of course, a JPEG file can opt to discard more information than our brains would to further reduce the size of the file. It is also not nearly as intelligent as our brains are at deciding which information is safe to discard.

Because it works by discarding high-frequency information, things like rapid hue shifts and changes in gradation, JPEG does not work so well for images that consist more of solid colors than of rapidly changing ones. In those cases, it still discards information, but our brains are no longer ignoring the fact that information is gone. The result is that the compression artifacts are highly visible and the image quality does not look as good as it would on one with more fine details.

The JPEG format does theoretically allow for a lossless format, but most software does not support that option. The lossy format also allows the user to adjust the amount of compression that they want to apply so they can tailor the compression to the specific image being used, but there will always be some compression applied.

PNG

First appearing in 1996, PNG was designed to be a replacement for the GIF format. GIF was hindered by patent issues and only supported 256 colors at a time. As monitors at the time were now supporting millions of colors, GIF was no longer sufficient from a quality perspective. JPEG existed by that time for the higher color needs but suffered from lossy compression that made it unsuitable for many image types.

Since JPEG is the lossy format in our JPEG or PNG showdown, it stands to reason that PNG is the lossless one. There are actually several different lossless compression filters that PNG can use. It can support a variety of different image types as well. Those image types are:

  • Grayscale - A simple black and white image.

  • Indexed - An image made up of indices into a color palette that is limited to 256 colors.

  • RGB - A truecolor image, composed of millions of possible colors.

Unlike JPEG files, PNG allows for transparency in the image by storing what is called an alpha channel. All three of the image types supported by the PNG format can contain transparency. PNG's adoption over GIF was slowed, due in part to the fact that the Internet Explorer web browser had a buggy implementation of the format up until version 9.0. Now, however, you are only likely to see a GIF when its animation feature, not supported by the base PNG format, is needed.

Which is better?

So, how do you decide between JPG vs. PNG for your project? The answer depends on your needs. Because photography is almost always dealing with high-frequency images, filled with the types gradients and fine details that real-life object has, and that our brain's own filtering methods evolved for, JPEG makes the most common choice for photos.

There are exceptions to that rule, of course. One problem with lossy compression is that if you will be opening it and then saving it in a lossy format again, you've just doubled your loss. This means that lossy file formats degrade each time you open them and then save them. Keep in mind that multiple saves of the same open file will not cause this to occur. It is the act of saving and then reopening that will trigger the additional loss. If you plan on doing multiple edits of the same file, take this into consideration.

If your image is a drawing, which will have lots of spaces with solid colors, or even a photograph with a fair amount of text overlayed on it that also has large amounts of solid colors, then you are going to want to opt for PNG. As we mentioned in the lossy vs. lossless section, lossy formats such as JPEG lose their quality when large spaces of solid color are used.

If you need a format for printing and your printer supports the RGB color space, then most of the same recommendations for JPG or PNG apply as they do above. Typically for print, the question of JPEG vs. PNG isn't relevant, as professionals will use a higher quality format such as TIFF or PSD.

If your need any photo equipment, check out what Amazon offers:

With Movavi Photo Editor, you can open the JPEG images that your camera likely produces and save them as JPEGs, or save them as PNGs, TIFFs, and many other formats. You'll always have the format that you need to best suit both your workflow and your final output requirements. You can also create images completely from scratch and save them to whatever format you like. We invite you to download a free trial of Movavi Photo Editor today. It is available for both Windows and Mac computers.

Movavi Photo Editor

Easily enhance images and get professional-grade results in a snap.

*The trial version of Movavi Photo Editor has the following restrictions: you can save up to 10 images with added watermark, screenshots are disabled.

Movavi Photo Editor

Frequently asked questions

What are the differences between JPEG and PNG files?

JPEG and PNG files are two popular image file formats, each with its own unique characteristics. To understand the differences between JPEG and PNG files, you can use Movavi Photo Editor, a powerful tool that allows you to easily switch between different file formats and optimize your images. Movavi Photo Editor provides a user-friendly interface and advanced features for editing and saving images in both JPEG and PNG formats, allowing you to see the differences firsthand.

When is PNG better than JPEG, and vice versa?

PNG is generally preferred for images with sharp edges and solid colors, such as logos or graphics with text, as it provides lossless compression and preserves image quality. However, if you're working with photographs or images with gradients, JPEG is often a better choice due to its higher compression ratio. Movavi Video Editor can aid in optimizing your images for different file formats, allowing you to efficiently determine the best format for your specific needs.

Which file format is better for web use, PNG or JPEG?

When considering web use, JPEG is generally preferred for its smaller file size, which leads to faster loading times and better performance on websites. For images with sharp edges, such as logos or icons, PNG files might be more appropriate. Web designers and developers can use Movavi Video Converter to easily convert images between different formats and optimize their size for web use.

What are the benefits of using PNG files?

PNG files offer lossless compression, meaning no data is lost during compression, and they support transparency. For graphic designers and web designers, Movavi Photo Editor is a great tool for creating and using PNG files, as it allows you to control the transparency level and optimize images for various purposes.

What are the benefits of using JPEG files?

JPEG files are known for their high compression ratio, which results in smaller file sizes and faster loading times. Photographers and content creators can benefit from Movavi Video Editor's JPEG compression features to optimize their images for web use and social media sharing.

Have questions?

Have questions?

If you can’t find the answer to your question, please feel free to contact our Support Team.

Join for how-to guides, special offers, and app tips!