keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

Fix to the webp regex so that URLs such as '/images/foo.jpg' work when the src/url does not include 'http[s]?' #60

Closed picasticks closed 4 years ago

picasticks commented 5 years ago

This way any src URL, such as "/wp-content/uploads/..." or "//example.com/wp-content/uploads" or even "sftp://example.com/wp-content/uploads" will work with the WebP feature.

The problem on our sites was that these URLs were being skipped by the WebP feature.

This was a very simple fix to just remove the https[s]? from the regular expression.

Thanks for the plugin!