Png files fail to show in preview (Safari)_

Any idea why hype might only display jpg files and not pngs?

We have a relatively complex Hype project to build a widget for in-house company assessment (so it's confidential and I can't share the project here). Some test prompts have an image accompanying them. We flag this by putting jpg or png at the start of the prompt item in the array. This is then split off and used to compile the file name and it then pulls the image from Resources and displays it.

In iAd Producer, which we are currently moving to Hype from, this code works fine and both png and jpg files show fine in Safari when we preview. However, when porting over to Hype, we have found that png files don't display. The only way we've found around this is to convert them to jpg, which is easy enough to do, but we wondered why this should happen.

The only issue related to this on the forums is

which focusses on Chrome. We always preview in Safari because we're embedding our content in iPads. However, the issue we're facing happens in Chrome and Safari so it's not a Chrome issue.

Again, apologies that I can't share the Hype project. It's fairly complex too so I can't really figure out how to efficiently trim it down to isolate this issue for these forums.

Any ideas?

It’s possibly the optimisation that Hype does to images. It’s known to change .png’s in the resources folder to jpg’s.

In Hype there is a checkbox below the resources panel.


If you uncheck this box then it shouldn’t change the image resource.

That would be my first check

1 Like

If you know which image is not displaying, can you select it in the element list, copy + paste it into a new document, and see what happens then? Does it appear in the resource library? When exported, does it exist in the resource library folder?

your first check turned out to be the only check we needed. Thanks so much for giving us that idea.

Strangely though, we have 18 png files in total. Four of them are switched to jpg files by Hype. The rest remain as png files and this was consistent: those same four are always switched. When we unchecked the automatic opitimisation, all images displayed.

Hype is packed with great features, only some of which we’re now discovering :laughing:


Is there some kind of rationale / documentation for this ‘feature’ so we can prepare our resources appropriately in future?

I'm a little unclear on the original post though; it sounded like some images just weren't displaying, but Hype's automatic optimization will change references in the document so it should all display just fine. Were you referencing this in code in which you expected a .png file but it didn't exist (and instead was a .jpg)?

Anyways, the basic behavior and rationale can be found in this post:

We found this feature does far more good than harm, but for some workflows you may never want it enabled. If so, there's presently a Terminal command you can issue to permanently disable newly added images from enabling the optimize checkbox:

defaults write com.tumult.Hype2 newResourcesAreSetToAutoResize -bool NO
defaults write com.tumult.Beta.Hype4 newResourcesAreSetToAutoResize -bool NO

that’s very helpful. Thanks.