Fixed bug where uppercase file extensions on images were not recognized.