webp icon indicating copy to clipboard operation
webp copied to clipboard

Exclude SVG

Open rimmeh8 opened this issue 1 year ago • 2 comments

HI,

how can i exclude .svg files from beeing processed to .webp?

rimmeh8 avatar Sep 05 '24 07:09 rimmeh8

Hi,

Have you sure that your Apache or nginx configuration is properly set up ?

If you've used the configuration in the only jpeg, png and gif files should be processed

Here's the configuration for Apache:

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>

I hope it can help you

rubsilv avatar Oct 02 '24 17:10 rubsilv

@aggrabbah that's only the webserver config, not the actual processing. @rimmeh8 I'll take a look at that option. Thanks for your report.

wazum avatar Sep 10 '25 11:09 wazum