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

Webp image "overwritten" when 2 images with the same name but different extensions exist #602

Open michalb314 opened 8 months ago

michalb314 commented 8 months ago

Hi.

Recently i came across an issue when deploying webp express on a website. This webiste doesn't have a year/month folder structure, all images are stored in the same folder. I had uploaded two images with the same name but different extension, let's call them image.jpg and image.png. When webp express is activated, it seems like it takes both those image and converts both of them to image.webp, effectively "overwriting" one of them. This results in a wrong image being displayed on the website.

From what i've gathered, this requires that both images have the same name but different extension and both be in the same upload folder.

Obviously the error here is that there's 2 files that have the same name(despite the extension), but i thought i'd report this anyway.