this post was submitted on 26 Dec 2025
52 points (81.7% liked)

Ask Lemmy

36216 readers
1993 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

Especially when they use websites like Reddit which allows for unlimited space for photos.

top 22 comments
sorted by: hot top controversial new old
[–] HetareKing@piefed.social 88 points 1 day ago* (last edited 1 day ago)

PNG does not compress photos very well. A photo that is 5 MB when saved as a high-quality JPEG may very well be at least 15 MB as a PNG. Also, a lot of cameras (phone or otherwise) save to JPEG by default.

I do wish more people would use PNG where it makes sense, though. The other day I made an edit to an image containing line art that was purely black and white except for the compression artifacts. I applied a threshold so that all the artifacts became either perfectly black or white and saved it as a monochrome PNG, reducing the file size to less than a third, while containing more information and having a cleaner image. I later remembered that I could reduce the file size even more by using indexed colours. In other words, whoever originally saved it in a lossy format actually made it take up more space than needed while also needlessly reducing image quality.

[–] IWW4@lemmy.zip 60 points 1 day ago (1 children)
[–] lime@feddit.nu 54 points 1 day ago

png is not designed for photos, it compresses graphics buch better. jpeg is the opposite.

[–] TrickDacy@lemmy.world 30 points 1 day ago

You seem to realize that pngs are larger. Are you convinced that web performance doesn't matter? Just because you technically can use a larger image doesn't make it a good idea. If the web were all png and no jpgs every site and app would literally be something like twice as slow. Sounds like a bad time to me. Studies have shown in e-commerce settings even a couple hundred milliseconds in load time can have significant impacts on sales.

[–] IphtashuFitz@lemmy.world 13 points 1 day ago* (last edited 1 day ago) (1 children)

My employer uses Akamai as a CDN (and security) provider for their websites. Akamai has an optional tool called Image and Video Manager that, in a nutshell, optimizes images for better site performance.

Basically you put a high quality image on your website, and when Akamai retrieves it the first time it optimizes its color palette, compression, size, and format for multiple devices. Each derivative image is cached by Akamai for 30 days at a minimum.

So while you may put a 1000x1000 JPG with a quality of 95%, an Android user may be served a 200x200 image with 80% quality, and it may be a WEBP or PNG format instead of JPG. Exactly which derivative image is served is based on criteria like the web browser being used, the viewport size, etc.

That is a pretty cool solution.

[–] Mighty@lemmy.world 11 points 2 days ago (1 children)

For me it's simply routine. If I have pictures that I want in high quality without compression, I have tiff or raw, but jpeg is usually enough to save images without using much space and still having the colour profile embedded.

[–] RockBottom@feddit.org 11 points 1 day ago (1 children)

A physically huge JPG with very low quality is smaller than a PNG in file size and looks just as good in the browser.

[–] Mighty@lemmy.world 8 points 1 day ago

Huh look at that. I guess you tell me why I still use jpeg xD Compatibility? Print?

I'm just old and use PNG only to preserve transparency in images

The vast majority of people don't think about what format their pictures are in.

[–] Libb@piefed.social 10 points 1 day ago* (last edited 1 day ago)

Jpeg offers better (albeit destructive) compression, can store photographic metadata (IPTC and so on). It's also very widely popular.

On my blog, I use neither JPEG or PNG as I want the best compression I can. I use AVIF, even though it's a video file format it works great with still images (it's even better than webp) and it's supported by all modern browsers. Edit: I should point out that I don't share much photos either, I've quit doing photography many, many years ago.

[–] chunes@lemmy.world 9 points 1 day ago* (last edited 1 day ago)

jpg gets a bad rap because people don't bother to adjust the compression. For most images, you can get it looking great and for not much space.

[–] brucethemoose@lemmy.world 5 points 16 hours ago

The real answer is because it’s default.

People use what’s the default. It’s that simple. Any knowledge of how images are encoded is kind of unnecessary information for most folks.

There are a ton of technical and usage-based arguments around image formats, and political complications, but ultimately jpeg’s eternal dominance comes down to people using their app defaults, and wanting stuff to just work. And PNGs are big enough to create technical issues or incompatibilities, sometimes.

[–] fodor@lemmy.zip 5 points 1 day ago

Other great technical answers here. Also, practicality. My phone and camera take JPGs. So why waste time converting?

[–] 31ank@ani.social 5 points 21 hours ago* (last edited 21 hours ago)

Use png when your image has sharp corners (text, graphics, etc.). Use jpg for photos etc..

They are two different formats made for different purposes. (You will get the block-artifacts in jpg when using sharp corners and high compression, using png for camera-pictures will create large files).

Or use a modern format like webp or jpgxl, but some devices don't support these formats so most things online are still jpg/png.

And if you have a vector image instead of raster use svg

[–] callyral@pawb.social 4 points 12 hours ago* (last edited 12 hours ago)

I use JPEG with 90% to 95% quality and it gets similar results to a PNG while occupying way less space usually. I wouldn't use it if I was uploading to Reddit though.

[–] Treczoks@lemmy.world 3 points 1 day ago (1 children)

There are photos, where JPG is way better. On the other hand, I often use SVG for drawings, it simply scales way better. PNG is somewhere in the middle.

[–] TrickDacy@lemmy.world 5 points 1 day ago (1 children)

Png is raster based, so not really in between the two.

[–] Treczoks@lemmy.world -1 points 1 day ago

It is better for rasterized images that are not photos. In most cases, SVG is better for drawings as such. As in "don't even start this raszerizing shit".

[–] Tattorack@lemmy.world 2 points 12 hours ago

Jpegs can make images with very small sizes that aren't noticeably worse in quality (unless you go to incredibly low compression).

They're good for uploading as a final image when there's no transparency necessary.

Obviously, you don't want to be working with jpegs if you're an artist and still in the process of making the final image.