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