I have a case where a PNG image appears differently in edit and preview mode versus normal mode. The normal mode image has black bars at the top and bottom of the image. The edit / preview image does not.

This issue came about after a server migration. The issue did not occur on the previous server and does not occur on my local. I have done all of the usual checks to ensure this isn't user error.

The difference can be seen by visiting the image URL directly.

Preview Mode URL


Normal Mode URL


The image item is of this template: /sitecore/templates/System/Media/Unversioned/Image

I know there's a setting where you can change the default background color of transparent images in the Sitecore config. This makes no difference because it doesn't apply to PNGs.

I also deleted the related items in web and republished from master.

Am I missing something? Do I need to "rehash" somehow or do something with the hash key? The hash key has not changed during the server migration.

Sitecore version is 9.0.2

1 Answer 1


It turned out to be that there were two images with the same path / name. One was a jpg and one was a png.

Because we're using paths instead of IDs for the image URLs, Sitecore seems to have trouble resolving the correct image. It was loading the jpg instead and applying the default black background color because it was a jpg.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.