Convert to JPEG if format is other than jpeg/png/gif