Open DavidSchirduan opened 4 years ago
WebP is already yesterday's news ;) AVIF would be the way to go.
You could hack around with jekyll-replace-img
to replace all img tags, but I'm not sure it would work without also rewriting parts of the CSS. I might take a look at it myself sometime, but it will take a while
The internet moves too fast for me! Thanks for considering it; I'll see if I can devise a temp solution for now.
There is actually a fairly decent fallback solution, which I assume could be implemented as part of the hy-img component.
<picture>
<source type="image/avif" srcset="image.avif" />
<source type="image/webp" srcset="image.webp" />
<img src="image.jpg" srcset="image.png" alt="Some Image" />
</picture>
More details can be found here, including debugging/testing tips.
I know the webp image format is slowly taking over and offers massive savings in data without must loss of quality.
However safari and ios still don't support webp.
Normally I could use liquid and some elements to serve webp files safely, but the hydejack image processing doesn't play nicely with these.
Might be a nice feature for jekyll to automatically use the .webp version if it exists.