Added support for multiple image formats