rosell-dk / webp-express

Wordpress plugin for serving autogenerated WebP images instead of jpeg/png to browsers that supports WebP
GNU General Public License v3.0
229 stars 64 forks source link

Add escape hatch for bypassing redirection: ?original #522

Closed rosell-dk closed 3 years ago

rosell-dk commented 3 years ago

Put the following into the .htaccess:

  # Escape hatch: adding ?original to an url can be used to bypass redirection
  RewriteCond %{QUERY_STRING} original$
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule . - [L]

This will allow users to insist on showing the jpeg / png for selected images, by adding "?original" to the image url

PS: The escape hatch will also work with Alter HTML - Alter HTML actually skips any image with a querystring

rosell-dk commented 3 years ago

https://wordpress.org/support/topic/can-i-make-an-exception-for-specific-post-image/