Files
interblue.pl/modules/pshowlazyimg/.htaccess-webp-on-the-fly
2024-10-25 14:16:28 +02:00

10 lines
342 B
Plaintext

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^(.*)\.(jpe?g|png)$ %{ENV:REWRITEBASE}modules/pshowlazyimg/webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,L]
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>