added support for different image file types