fixes #3115 and adds support for gif bmp & tiff images

when showing image preview check via lowercased extension and adds support for gif bmp & tiff images
Merge pull request #3950 from bbodenmiller/patch-4

fixes #3115 and adds support for gif bmp & tiff images