Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIF not working with webp #90

Open
dennismetz opened this issue Jan 25, 2024 · 1 comment
Open

GIF not working with webp #90

dennismetz opened this issue Jan 25, 2024 · 1 comment

Comments

@dennismetz
Copy link

GIFs are no longer played as soon as the extension is installed and configured (htaccess/nginx).

@rubensilva09
Copy link

Hi,

In the README's Apache configuration, GIF is a part of the rewrite condition.

RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} (.*)\.(?i:png|**gif**|jpe?g)$
RewriteCond %{REQUEST_FILENAME}\.webp -f
RewriteRule ^ %{REQUEST_FILENAME}\.webp [L,T=image/webp]

<IfModule mod_headers.c>
    <FilesMatch "\.(png|**gif**|jpe?g)$">
        Header append Vary Accept
    </FilesMatch>
</IfModule>

Removing those should fix your issue at the moment on the web server side.

RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} (.*)\.(?i:png|jpe?g)$
RewriteCond %{REQUEST_FILENAME}\.webp -f
RewriteRule ^ %{REQUEST_FILENAME}\.webp [L,T=image/webp]

<IfModule mod_headers.c>
    <FilesMatch "\.(png|jpe?g)$">
        Header append Vary Accept
    </FilesMatch>
</IfModule>

-- In case you don't need to process GIF files, that is.

Don't forget to adapt the extension's configuration too :)

image

Hope this can help you, have a nice evening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants