@ramonjosegn
You could try.
# BEGIN EWWWIO
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
RewriteCond %{REQUEST_FILENAME}.webp -f
RewriteRule (.+)\.(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=accept:1]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REDIRECT_accept
</IfModule>
AddType image/webp .webp
# END EWWWIO
https://ww.wp.xz.cn/support/topic/alternative-webp-rewriting/
-
This reply was modified 9 years, 8 months ago by
Luke Cavanagh. Reason: clarify wording
I think should be interesting a aditional plugin with code for <picture> element, maybe
<a target="_blank" href="http://webimagen/miimagen.webp">
<picture>
<source srcset="http://mywebsite/maparuta4.webp" type="image/webp">
<!-- fallback for browsers without support -->
<img src="http://http://mywebsite/maparuta4.jpg" alt="Alt text">
</picture>
</a>
Thanks for the answer
@ramonjosegn, already on the roadmap 🙂