only compress to jpeg if mime type is not png