Fix issues related to image formats