this post was submitted on 25 Mar 2024
67 points (98.6% liked)

No Stupid Questions

2174 readers
1 users here now

There is no such thing as a Stupid Question!

Don't be embarrassed of your curiosity; everyone has questions that they may feel uncomfortable asking certain people, so this place gives you a nice area not to be judged about asking it. Everyone here is willing to help.


Reminder that the rules for lemmy.ca still apply!


Thanks for reading all of this, even if you didn't read all of this, and your eye started somewhere else, have a watermelon slice 🍉.


founded 2 years ago
MODERATORS
 

It seems like either

  • I get a .webp file when I don't want it (downloading images)

  • I try to use a .webp format, but it isn't allowed (uploading images)

So who is trying to encourage people to use it, and who is trying to prevent adoption?

I'm constantly converting it with imagemagick and other tools

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 5 months ago (1 children)

I know that some CDNs like Akamai will serve it up in cases where it optimizes delivery of the image. They have an add-on service for their customers called Image and Video Manager. Among other things it can compress images to improve performance.

Imagine a website that displays a JPG file that has thousands of colors and a resolution of 10,000x10,000 pixels. That’s terrible for loading across the internet because the human eye can’t distinguish that many colors and most devices have screens smaller than 10k. The website in question could also be putting that image in a frame that’s only 1k in size.

So what Akamai’s service does when it sees this image is that after serving it up the first time it optimizes it to a number of different sizes and formats. It will make multiple copies in different resolutions & file formats, and reduce the number of colors without impacting the visual appearance of the image. The optimizations target popular devices & browsers, so you could end up with a bunch of different sized jpegs, webps, pngs, etc.

Once all those versions have been created they are automatically added to Akamais CDN cache. The next time a person visits that website Akamai will look at the characteristics of the device being used and serve the best optimized version of the image that the device supports. So if you’re running Chrome on a mobile device you might get a 800x800 webp version of the image rather than the original 10,000x10,000 version, for example.

[–] [email protected] 4 points 5 months ago (1 children)

That last bit drives me up the wall sometimes, if I find an image that I like, I want to see it in the highest resolution possible, even if it will cause my device to catch fire

[–] purplemonkeymad 8 points 5 months ago (1 children)

In that last case, it is usually performed by rewriting the uri of the image. Those images will typically have query strings after the filename that get the optimized versions. If you remove the query strings parts you normally get the original image.

[–] [email protected] 4 points 5 months ago (1 children)

That’s not always the case. With Akamai I can very easily enable this tool on all images on my employers website and there will be no easy way for a user to bypass it.

I just took a look at www.frankandoak.com which Akamai says is a user of this tool (and not my employer). They’re a clothing retailer and have a lot of images on their site. Using the developer tools in Chrome I can see that a lot of their images of products are being served as webp even though the file extensions are jpg. It looks like they add version numbers as parameters on image urls, and removing those effectively does nothing. I’m still served webp versions of those images.

[–] [email protected] 2 points 5 months ago* (last edited 5 months ago) (1 children)

that site uses shopify (and runs through cloudflare for my origin ip). shopify has their own image and video 'processing' available to their hosted sites.

[–] [email protected] 2 points 5 months ago

Curious then that Akamai touts them as a success story:

https://www.akamai.com/resources/customer-story/frank-and-oak