Skip to content

Instantly share code, notes, and snippets.

@HechtMediaArts HechtMediaArts/.htaccess
Last active Nov 20, 2016

Embed
What would you like to do?
Code für den WebP-Support für das Optimus HG Plugin
# ----------------------------------------------------------------------
# webP Grafiken statt jpgs verwenden
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule ^(wp-content/uploads.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REDIRECT_accept
</IfModule>
AddType image/webp .webp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.