this post was submitted on 11 Oct 2023
230 points (96.7% liked)

Ask Lemmy

26753 readers
1312 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try !politicaldiscussion@lemmy.world


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.


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 1 year ago
MODERATORS
 

is it a formatting step that an image goes through when uploaded? I'm tired of converting image after image back into jpg, so if there's like a step I can take to avoid it being a webp, it would help to know

top 50 comments
sorted by: hot top controversial new old
[–] Chronographs@lemmy.zip 86 points 1 year ago (1 children)

If something doesn’t support webp you should really be converting it to png not jpg so it doesn’t get more degraded

[–] JohnDClay@sh.itjust.works 16 points 1 year ago (8 children)

Isn't jpg more efficient for pictures, whereas png is better for graphics type elements with defined colors and edges?

[–] Chronographs@lemmy.zip 40 points 1 year ago (3 children)

Jpg is lossy and throws away information every time it is used, that’s why you get the “deep fried effect” when you re-encode something repeatedly. PNG is lossless so it’s a perfect replica of whatever image you encode with it. It does take up more space however.

[–] LillyPip@lemmy.ca 14 points 1 year ago* (last edited 1 year ago) (1 children)

Minor niggle: the ‘deep fried effect’ isn’t because jpg throws away information every time, it’s because the compression algorithm averages pixel boundaries, and that averaging multiplies with each compression pass.

It can actually bloat the size of the file by adding information – adding data to previously null pixels, whereas png would keep them clean.

e: it achieves this through pixel averaging (fuzzing), which is why you’ll see grey artefacts bleeding into the pixels around line art. This is magnified with each compression.

[–] Slotos@feddit.nl 17 points 1 year ago (2 children)

You’re conflating “data” with “information”.

Repeated re-encoding loses information. “The compression algorithm averages pixel boundaries” is a perfect example of losing information.
That it sometimes results in more bits of data is a separate phenomenon altogether.

[–] MutilationWave@lemmy.world 9 points 1 year ago

Thank you I learned something today.

[–] LillyPip@lemmy.ca 4 points 1 year ago* (last edited 1 year ago)

That’s fair. Thank you for making that distinction.

e: It’s still bad for the user, though.

load more comments (1 replies)
[–] Granixo@feddit.cl 34 points 1 year ago* (last edited 1 year ago) (1 children)

JPEG is for real life photos and document scans, using it for anything else is just lossy compression.

load more comments (1 replies)
[–] Max_P@lemmy.max-p.me 25 points 1 year ago

whereas png is better for graphics type elements with defined colors and edges?

The reason for that is rather surprising, but PNGs are basically zipped BMPs with an optional filter step to arrange the pixels in a way that compresses better.

And that's why if you give it a photo with lots of details, it's not very effective and just gives you a rather big file. PNG barely does anything compared to JPEG and other formats. That's also why it's great for small things like icons: it decompresses fast and still manages a fairly good compression ratio when a good chunk of the image is transparent or flat background.

[–] dyc3@lemmy.world 14 points 1 year ago

Jpg is better for photographs. Png is better when there are a lot of homogeneous pixels, like cartoons or rasterized vector graphics.

[–] amio@kbin.social 9 points 1 year ago (2 children)

PNG is lossless and JPEG is not. JPEG is about a sliding scale of "quality" (at the cost of file size) and minimizing how much it fucks with the visual end result.

load more comments (2 replies)
[–] eerongal@ttrpg.network 7 points 1 year ago

Jpg is really bad for anything with sharp lines, such as text. It also doesn't support alpha channel (transparency) which is reasonably important in modern web design.

PNG is loseless, which is great for... anything other than storage/bandwidth due to file size. There's even an animated PNG standard, similar to animated GIF, but you never see that used anywhere.

[–] LillyPip@lemmy.ca 4 points 1 year ago

(I accidentally responded to the wrong comment before.)

Yes, that’s exactly right.

load more comments (1 replies)
[–] harmonea@kbin.social 43 points 1 year ago (9 children)

if there’s like a step I can take to avoid it being a webp

Formats are chosen by the uploaders and hosts, not the end user.

For easy conversion of images from the web, I recommend the FF addon Save webP as PNG or JPEG. Anytime you open an image in its own tab, it pops up with a menu that gives you a quick button to choose the format you'd like to save it in.

[–] IphtashuFitz@lemmy.world 5 points 1 year ago (1 children)

In some cases it’s chosen by a third party.

My employer uses Akamai for CDN, security, etc. One of the optional services they offer is called Image and Video manager (IVM). One of the things IVM does is analyze image files and converts them to multiple target formats based on how you set it up.

Suppose you have an image on your website that is a 1000x1000 pixel PNG file that’s 500k in size. The first time a client fetches it Akamai will serve it as-is but will also hand off its URL to an image processing server. That server will analyze the image, and based on how you configure it, might create multiple JPEG & WEBP formats that are 250x250, 500x500, and 750x750 in size, as well as 1000x1000. The new images are highly optimized without impacting the perceptual quality, and all smaller than the original images size.

Once these images are created Akamai adds them into their CDN cache alongside the original image. Now when a client requests the original PNG file they may actually serve one of the other versions based on the browser being used and device characteristics like viewport size, etc. But it’s all 100% transparent to the end user.

https://www.akamai.com/products/image-and-video-manager

[–] harmonea@kbin.social 3 points 1 year ago* (last edited 1 year ago)

You're not wrong of course, but I really need people to understand that this level of detail is not what a top-level reply to a lower-end technical question is aiming for. Maybe this will be helpful to someone, but I already knew it and didn't need it sent to me, and it's going to go above OP's head. For the average end user, this is abstracted somewhere in the "host stuff" layer, and that's fine.

load more comments (8 replies)
[–] Kwdg@discuss.tchncs.de 28 points 1 year ago (8 children)

Why do you need to convert to jpg?

[–] JackbyDev@programming.dev 48 points 1 year ago (22 children)

A lot of apps don't support webp yet. Facebook Messenger is a good example. If I want to share a meme that was webp it says "GIF" in the gallery and says it can't upload images in that format.

[–] boletus@sh.itjust.works 23 points 1 year ago (1 children)

So sad that the poor management at Meta can't find the money to add webp support to one of the most used chatting apps in the world 🥺

[–] xigoi@lemmy.sdf.org 8 points 1 year ago

They still haven't managed to find a way they could make $$$ out of supporting WebP.

[–] jacktherippah@lemmy.world 9 points 1 year ago

Wanna hear something funny? So iirc webp is a Google format. The other day I was preparing slides for class with my friends. Anyway, we were on Google slides. I tried to upload this image, but it says it's unsupported. So i checked the format and whaddaya know? webp. So a Google service doesn't even support a Google file format. LOL

[–] gamermanh@lemmy.dbzer0.com 5 points 1 year ago (1 children)

I've literally only run into 1 program that couldn't handle webp and that was a FOMOD creation tool for Bethesda game modding, and even then it worked but just tossed an unknown extension error

Though if you're using Facebook messenger that's probably the issue right there lol

[–] JohnDClay@sh.itjust.works 13 points 1 year ago (1 children)

Windows doesn't let you set them as background photos

[–] gamermanh@lemmy.dbzer0.com 6 points 1 year ago (2 children)

I haven't used a static wallpaper in so long I'd completely forgotten Windows normally handles that lol

load more comments (2 replies)
load more comments (19 replies)
load more comments (7 replies)
[–] Quackdoc@lemmy.world 11 points 1 year ago (1 children)

it got shoved down our faces

[–] PixxlMan@lemmy.world 13 points 1 year ago (2 children)

I hate when a new, efficient, fast image format is used by viscous developers to make their evil website load faster and use less bandwidth

GRRRR

Yes, JpegXL would've been even better, but WebP is good too.

[–] float@feddit.de 5 points 1 year ago (1 children)

I still hoping JpegXL will get some traction. The fact that it was removed from Chrome looks bad but they'll most likely add it again if it does. It's by far the best of all of them.

load more comments (1 replies)
load more comments (1 replies)
[–] art@lemmy.world 5 points 1 year ago

The jpg format is like 30 years old. Newer formats like jxl, webp, and avif offer much better compression. Right now it looks like webp is the most compatible with browsers so far.

[–] Steveanonymous@lemmy.world 5 points 1 year ago (1 children)

I hate the format. Synology photos regularly skips them on backup

[–] rikudou@lemmings.world 4 points 1 year ago

You should hate Synology then. Seriously, the format is the best (from technical point of view) widespread image format. You should complain at your software vendor that in the 13 years it has existed, they haven't had time to implement support. Especially for paid products, like Synology stuff.

load more comments
view more: next ›