Forum Replies Created

Viewing 1 replies (of 1 total)
  • algaebarn

    (@algaebarn)

    I had the same issue, I fixed I was able to fix it on my end with some info hidden (lol) in the readme.txt

    = Can I make an exceptions for some images? =
    There can be instances where you actually need to serve a jpeg or png. For example if you are demonstrating how a jpeg looks using some compression settings. It is possible to bypass both the redirection and the HTML altering for certain images. Here is how:

    *Alter HTML*
    Alter HTML is programmed not to substitute image URLs with query strings (better safe than sorry). You can exploit that and simply add ie ?original to the image URLs in question.

    *Redirection*
    To bypass the *redirection*, you can add the following in the .htaccess where *WebP Express* has placed its rules (this is usually in the wp-content folder). The rules needs to be added *above* the rules inserted by *WebP Express*.

    
    RewriteCond %{QUERY_STRING} original
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . - [L]
    

    With those rules in place, you can add “?original” to the URLs of those images that you want to keep serving as jpg / png.

    Alternatively, you can specify the filenames individually in the .htaccess:

    
    RewriteRule ^uploads/2019/02/example-of-jpg-compressed-to-80\.jpg - [L]
    RewriteRule ^uploads/2019/02/image2\.jpg - [L]
    RewriteRule . - [L]
    

    If you got any further questions, look at, or comment on [this topic](https://www.ads-software.com/support/topic/can-i-make-an-exception-for-specific-post-image/)

    • This reply was modified 5 years ago by algaebarn.
Viewing 1 replies (of 1 total)