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
221 stars 63 forks source link

Add `href` to attributes to be searched #609

Open nisbet-hubbard opened 1 month ago

nisbet-hubbard commented 1 month ago

Currently, <link> and <a> tags are searched by default: https://github.com/rosell-dk/webp-express/blob/18447e42cde58a3e876fa4184f8fa027bd258228/vendor/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php#L41-L44

But their href attributes aren’t searched, with the result that URLs in <link> and <a> don’t actually get replaced even when the relevant images have been converted.

This PR fixed the issue.