Support for JPEG/PNG conversion and pass through for content types instead of the hard-coded assumption that everything is 'image/jpeg'