Fix smart thumbnails for image files with uppercase extension