Umbraco-cms: Unable to View White SVG's in Media Section on Image Node

Created on 8 Jan 2019  路  7Comments  路  Source: umbraco/Umbraco-CMS

I just installed Umbraco 7.13.0 with all the defaults.

I then updated the umbracoSettings.config to ensure SVG is recognized as an image file type. Search this page for "imageFileTypes" to find out how to do that: https://our.umbraco.com/documentation/reference/config/umbracosettings/

I then dragged an SVG image to the media section to upload it. Once it uploaded, I clicked the media item to view the details:

white-svg

As you can see, the white SVG is not really visible. Well, it is, except that the background is also white, and white on white is just a big sea of white. Other SVG images that are not white (e.g., blue) are visible.

Other places in Umbraco deal with this by adding a checkerboard pattern behind the image, which gives it the necessary contrast to make it visible. For example, the media picker and the grid view in the media section seem to do this. Seems like this spot was missed, however.

communitpr releas7.14.0 typfeature

Most helpful comment

PR in #4050

All 7 comments

Hi @Nicholas-Westby

Thanks for reporting this issue. Can you provide the SVG that you used so we can use it for reproducing and for testing ?

Dave Community Pull Request team

This one should work (no that's not a blank page that opens, it's a white SVG 馃槈). We should have the checkered background behind it as well like we do in the list view overview, this is what it looks like in the list:

image

Of course when it's a completely solid white SVG I don't know what to do.

I've marked this as "Up for grabs" so that you or someone else coming along could create a pull request for it.

@nul800sebastiaan My mistake, I misread your comment, so I deleted my previous comment. Thank you for finding the white SVG sample.

Maybe also add a subtle drop-shadow to the image preview, like in the list-view? This would help for completely solid white images too.

I've got a fix for this, will push later 馃憤

PR in #4050

You rock, @kjac!

Was this page helpful?
0 / 5 - 0 ratings