Adding support for JPEG images.