Codeinwp / Nivo-Slider-jQuery

Nivo Slider - The Most Awesome jQuery Image Slider
http://docs.themeisle.com/article/485-getting-started-with-the-nivo-slider-jquery-plugin
MIT License
1.25k stars 605 forks source link

Images uploaded with uppercase extension resized every page load in Wordpress plugin #281

Open codeping opened 12 years ago

codeping commented 12 years ago

Uploading images with an uppercase extension causes generation of images to match slider size on every page load in the Wordpress version. The smaller version is saved with a lowercase extension but the code checks for the presence of the file with the same extension as the original. The uppercase resized doesn't exist so the lowercase is generated again.

Line 1269 of /plugins/nivo-slider/nivo-slider.php

$cropped_img_path = $no_ext_path.'-'.$width.'x'.$height.$extension;

Proposed fix:

$cropped_img_path = $no_ext_path.'-'.$width.'x'.$height.strtolower($extension);
gilbitron commented 12 years ago

This bug will be fixed in v1.7.