# Which is better, PNG or JPG?

**URL:** <https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321>\
**Category:** In My Humble Opinion\
**Created:** [April 28, 2023, 6:51pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321 "2023-04-28T18:51:23Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 30, 2023, 11:22pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/21 "2023-04-30T23:22:05Z")

</div>

Here is a link to the current (2023) Recommended Formats Statement by the Library of Congress:

> **[Recommended Formats Statement – Still Image Works | Resources (Preservation,...](https://www.loc.gov/preservation/resources/rfs/stillimg.html)**
>
> Lists technical characteristics of and metadata for photographs and other graphic images in both print and digital forms, along with microforms, that best support the preservation of and long-term access to these creative works. Identifies the...

Basically, TIFF, JPEG 2000, PNG, or JPEG/JFIF.

---

<div class="post-metadata">

**Author:** ![Banquet\_Bear](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/banquet_bear/32/373_2.png) [@Banquet\_Bear](https://boards.straightdope.com/u/Banquet_Bear)\
**Post date:** [May 1, 2023, 12:31am UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/22 "2023-05-01T00:31:33Z")

</div>

> [@DPRK](#):
>
> In that case, why not AVIF?

…because I can upload JPEGS directly to Webflow, click “compress”, and it gets converted to WebP. If it were that easy to do that with AVIF then I’d very much consider it. But WebP does the job perfectly fine thank-you-very-much.

> [@DPRK](#):
>
> Here is a link to the current (2023) Recommended Formats Statement by the Library of Congress:

Recommended formats for _digital preservation at the Library of Congress_.

For the photos I take, I’ve got about 8 x 4TB hard drives containing thousands of RAW files (both DNG and CR2) backed up onto duplicate hard drives and JPEG versions in the cloud. My keepers get converted to either high-resolution TIFFs or JPEGs. But the photos I put on websites for display don’t need to be archival quality. They need to look great and load fast. Horses for courses.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [May 1, 2023, 12:51am UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/23 "2023-05-01T00:51:20Z")

</div>

> [@DPRK](#):
>
> > [@Banquet\_Bear](#):
> >
> > > [@DPRK](#):
> > >
> > > It is some stupid Google format, and there is no compelling reason to use it. ⁢
> > 
> > …I’m finding I’m getting reductions between 50-80% in size when converting JPEGs to WebP, which has a significant impact on the load-time of the websites I’m building. I’m a convert. ⁢
> 
> In that case, why not AVIF? ⁢

WebP support is more widespread, and has been around somewhat longer. (The people who need the lower bandwidth the most are likely to have older software.)

Of course, if you have JPEG/PNG fallback, it’s not such a big deal.

Also, JPEG 2000 is one of those formats I’ve not heard about in a long time. I’m guessing the LOC jumped on the bandwagon early with that one, and still has it due to legacy support.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [May 1, 2023, 2:56pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/24 "2023-05-01T14:56:58Z")

</div>

I use [JPEG Mini](https://www.jpegmini.com/) to further compress my photos in my photography business, but it’s not a free service. I typically get a reduction of about 33-40% and it’s in a universally supported format.

I’m curious as to what is going on in WebP that could be reducing the file size by 50-80%. Is this for photographic images or for line drawings. I could believe that with the latter, but with the former that seems like a lot. Same size? Same apparent quality?

---

<div class="post-metadata">

**Author:** ![leahcim](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@leahcim](https://boards.straightdope.com/u/leahcim)\
**Post date:** [May 1, 2023, 3:56pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/25 "2023-05-01T15:56:31Z")

</div>

> [@pulykamell](#):
>
> I use [JPEG Mini](https://www.jpegmini.com/) to further compress my photos in my photography business, but it’s not a free service.

I’ve used [sqoosh](https://squoosh.app/) for similar things, and it seems to be free an open source. You can even clone the repo and run it locally.

> [@](#):
>
> I’m curious as to what is going on in WebP that could be reducing the file size by 50-80%. Is this for photographic images or for line drawings. I could believe that with the latter, but with the former that seems like a lot. Same size? Same apparent quality?

According too the [docs](https://developers.google.com/speed/webp) it has lossless and lossy modes giving 25% to 35% improvement in file size in both, with lossy compression considered equivalent if it has the same [SSIM](https://en.wikipedia.org/wiki/Structural_similarity), which is apparently a formal way of saying “at the same quality”.

Really it just seems like 10-15 years of incremental improvements (which is certainly nothing to sneeze at) rather than something truly revolutionary.

And image compression is not such a big deal as it was in the 90s. There’s more than enough bandwidth to let people get sloppy with their image encodings, or if they really need them small, just accept a little lower quality JPGs.

> [@Chronos](#):
>
> (I think there’s a way to make animated PNGs, too, but almost nobody ever actually does that)

The [MNG](https://en.wikipedia.org/wiki/Multiple-image_Network_Graphics) format came out at about the same time as PNG and was meant to be “like animated GIF, but for PNG”. [APNG](https://en.wikipedia.org/wiki/APNG) came out later. Neither really caught on that well.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [May 1, 2023, 4:44pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/26 "2023-05-01T16:44:35Z")

</div>

> [@leahcim](#):
>
> The [MNG](https://en.wikipedia.org/wiki/Multiple-image_Network_Graphics) format came out at about the same time as PNG and was meant to be “like animated GIF, but for PNG”. [APNG](https://en.wikipedia.org/wiki/APNG) came out later. Neither really caught on that well. ⁢

The trend these days is to use a video format, which honestly makes more sense for animation than sequential images.

Both AVIF and WebP have animation, which seems kinda odd since they both are static versions of existing video codecs. You’d think yo’ud just use AV1 and WebM. Just make sure your video format can handle transparency.

---

<div class="post-metadata">

**Author:** ![Dark\_Sponge](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dark_sponge/32/121_2.png) [@Dark\_Sponge](https://boards.straightdope.com/u/Dark_Sponge)\
**Post date:** [May 1, 2023, 4:49pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/27 "2023-05-01T16:49:22Z")

</div>

If you’re going to be doing any type of image editing/manipulation, lossless (like PNG) is better. Every time you change and save a JPG the image gets slightly worse.

When working on websites I almost always use the PNG (or other lossless format) version of an image, manipulate it, then save it as JPG (to make it as small as possible) before uploading it to the site.

---

<div class="post-metadata">

**Author:** ![rbroome](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rbroome](https://boards.straightdope.com/u/rbroome)\
**Post date:** [May 1, 2023, 7:04pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/28 "2023-05-01T19:04:34Z")

</div>

It has been a while since I worked with images, but it was my understanding that using jpeg formats for storing images presented potential problems when you combined the images. Say you had several satellite images, just saying, and needed to move them over a network and then tile them together. There was the possibility that artifacts would be introduced in the final composite image if the parts were jpegs. Kind of an edge case (pun intended), but png was just as easy and didn’t entail those risks.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [May 1, 2023, 9:48pm UTC](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321/29 "2023-05-01T21:48:35Z")

</div>

> [@pulykamell](#):
>
> I’m curious as to what is going on in WebP that could be reducing the file size by 50-80%. Is this for photographic images or for line drawings. I could believe that with the latter, but with the former that seems like a lot. Same size? Same apparent quality?

It is not that fundamentally different from the idea of JPEG, but it uses more efficient block prediction algorithms and compression methods to squeeze down the file size, at the cost of more computation. Like other formats, the exact savings will depend on the type of images, and whether you use lossless or lossy compression (and on the quality settings). I do not know if you can always expect WebP images to be half the size of JPEG, to say nothing of 80% smaller, for photographic images, though.

[Previous page](https://boards.straightdope.com/t/which-is-better-png-or-jpg/983321.md?page=1)
