Fix to limit lossless to only jpegs.