chunky-dev / docs

Chunky website and documentation.
https://chunky-dev.github.io/docs/
Other
1 stars 8 forks source link

Explore alternative formats for images #59

Open jackjt8 opened 2 years ago

jackjt8 commented 2 years ago

WebP offers file sizes that are around 30% smaller than JPEG without a quality gap.

Need to explore if this holds up and migrate everything over.

WebP Browser Support

leMaik commented 1 year ago

We could as well use AVIF, which has better compression but worse browser support: https://caniuse.com/?search=avif

Is there a way to let the browser select the best image format?

jackjt8 commented 1 year ago

We could as well use AVIF, which has better compression but worse browser support: https://caniuse.com/?search=avif

Is there a way to let the browser select the best image format?

If we use picture...

 <picture>
  <source srcset="photo.avif" type="image/avif" />
  <source srcset="photo.webp" type="image/webp" />
  <img src="photo.jpg" alt="photo" />
</picture>
Peregrine05 commented 1 year ago

WEBP is already supported on every major browser, and making more than one image format available might simply result in unnecessary work and storage space being used.