I can’t get webP images going on my site. I am using lazyloading, lots of different srcset sizes and progressive jpeg rendering. Is anyone having an Idea, why webp images do not even show up? (not to mention in the wrong order.
{% for image in p.media.images %}
<picture>
{% set service_image = image.derivatives(750,2900,700).enableProgressive().sizes('100vw') %}
<img class="lazyload"
data-src="{{ service_image.url(false) }}"
data-srcset="{{ service_image.srcset(false) }}"
sizes="{{ service_image.sizes(false)}}">
</picture>
{% endfor %}
output is as desired for jpgs, but no webp images anywhere.
@anon76427325 thank you for checking my code. I am not using Quark, but wrote a template myself.
Via dump I also don’t see the webP image, and also Grav did not even start to generate webp images (that I would notice in lagging reload because I have quite some images on the page).
@anon76427325 Thanks for that clarification. I just assumed, Grav would provide webps of jpegs as derivates for Chrome/FF users. I hope support for this feature comes in the future.
I hope not Webp is a completely different image format with different algorithm. It’s not a version of an image, but rather a completely different image which needs a conversion. Like JPEG and PNG.
BTW, it totally depends on an image. Some webp images look way worse than same size jpegs. Webp might not have artifacts jpeg has, but webp is completely washed out if image has lots of detail