Transparent PNG not displaying transparent on pages

I am fairly new to Omeka, and I am using the “Media embed” block to add a transparent png logo to my page. The actual attachment is displaying with no transparent background, and when I enter into the “Block layout configuration” under the “Background” dropdown, I am able to set the “Color” as transparent, but I then have to re-add the image. This displays two images on my page: one with no transparent background and the other perfectly transparent but completely covered up by the other, non-transparent image. I tried removing the attachment (non-transparent) from the block and it - expectedly - removed both images from the page. How do I display just the image/png with the transparent background?

The problem is probably that what’s actually getting embedded is a thumbnail or other resized derivative image. Omeka S makes all those derivative images as JPEG files, so they won’t carry over any transparency.

For a logo, you might want to try using an “Asset” instead, and the Asset block. Assets get used exactly as-is, so it’ll just be the exact PNG you uploaded that gets shown.

1 Like

Thank you so much! The Asset block was a much more appropriate fit for my needs.

Is it possible to add an option to make a derivative image into a png instead of jpeg? Are there any advantages of a jpeg over a png?

While yes, currently I use the Asset panel for anything like a logo or something else that has transparency, I can easily see a benefit to organizing something like project sponsors as an item or item set instead of letting their logo get lost in an Asset panel with hundreds of other images, or uploaded multiple times because someone doesn’t want to take the time to look for it, therefore leading to the possibility of different or outdated versions that may make the sponsor unhappy…

We don’t offer a setting to change what the format of the derivatives is, and we probably won’t? They’re JPEG mostly for size reasons; we make three of them per uploaded file, and most thumbnailable files we see are the kind of images that compress much better as JPEGs.

On a technical level, some switch that made all conversions to png instead would be possible, but the way the system works it’d have to be something where you switch the extension first before adding anything, or go back and re-thumbnail everything after changing it, because there’s a baked in assumption that all thumbnails share an extension; there’s not a system for having some be jpg and some be png.

1 Like