Optimize Image Issue - PNGs converted to JPGs

Hi to All!

I’ve come across an issue that I have found mentioned in the Forum archives - but not in the Documentation.

When “Automatically optimize when exporting” is selected for a PNG image it is converted to a JPG on export. (Hype v3.5.3 [538] Pro). I’ve tested 6 different PNG images (no transparency) with the same outcome. This problem shows up in the Hype Preview as well.

I came across this issue because I was coding a background PNG image swap in an element and it of course requires a URL as part of the code. It took a while to track this one down.

This is a feature, though I understand how it is unexpected. If a PNG has no transparency and there is a reduction in size via jpeg compression, we will convert the format. Simply put, there were many users bringing in massive PNGs that could be highly compressed, especially for retina devices, causing their site to be slow.

Even if the file format is the same, accessing by name isn’t always going to yield expected results with ‘automatically optimize’ turned on; Hype will often generate a @2x variant and use the original naming as the lower resolution @1x version. Basically if you need to use the resource in code, you should disable the automatically optimize box.

1 Like

@jonathan @Daniel

It would be good to mention this in the Documentation (currently no mention, at least in the section: "Resource Optimization" > "Image Optimization").


1 Like

Thanks Jim – added some detail to our docs to cover this.

1 Like

Thank You Daniel!