junaidbhura / fly-dynamic-image-resizer

Fly Dynamic Image Resizer plugin for WordPress
https://wordpress.org/plugins/fly-dynamic-image-resizer/
MIT License
162 stars 26 forks source link

Case sensitive file extension #38

Closed junaidbhura closed 4 years ago

junaidbhura commented 4 years ago

Originally reported here: https://wordpress.org/support/topic/bug-in-file-extension-capitalization/

Although the file name is the same as the original, the file extension is created using pathinfo, which could cause the file extension's case to be different from the original image.

dangoodspeed commented 4 years ago

Thanks Junaid, do you need anything else from me? What is the usual turnaround time for an issue like this? Just for my own planning as we'll be going live in a week or two with a site that is effected by this bug and I need to know if I have to come up with another solution on my own.

junaidbhura commented 4 years ago

Hey @dangoodspeed I can't promise a fix by that time, unfortunately! It is possible, but I'd recommend you finding a solution if you have a site launch that depends on this!

A simple fix would be to just rename the image and upload it again?

dangoodspeed commented 4 years ago

Thanks. In my particular case, it's a site migration with tens of thousands of images, probably several hundred of them with the wrong case. All the images are already imported, scattered over 15 "years" in the WP uploads folder. We're using Fly because we didn't want a dozen different image sizes created for each image. So for me at least, the solution isn't as easy as renaming an image and re-uploading. I'd have to write a script to change all instances in the database, and also rename all the files with lowercase versions.

junaidbhura commented 4 years ago

Wow, that is a lot @dangoodspeed !

Thanks again for raising this issue, and I'll try and roll out a fix as soon as I get some time to spend on this!

junaidbhura commented 4 years ago

@dangoodspeed I've updated the plugin with the new fix! Please feel free to continue this discussion here.

dangoodspeed commented 4 years ago

Thanks @junaidbhura ! Just tried it and it works!

junaidbhura commented 4 years ago

Thanks for the confirmation @dangoodspeed !