Still SVG problems in Safari browser

Hi guys,

I have always been a fan of X but the last year I’m getting so many problems…
The most annoying one is with SVG’s, which wasn’t a problem several months ago.

SVG issues in Safari browser is still not solved. The Image-element is broken. SVG’s ar sized to 1x1 px and adjustment is NOT possible. Your earlier advise was to use Chrome instead of Safari but lately this stopped working to. In Chrome it’s not sized to 1x1px but ± 25% of the original saved image size. Also it’s NOT adjustable. (SVG in a classic element works, but lacks all adjustments I need, and I don’t want to do this with CSS)

When will there be a fix for this as I’m using a lot of SVG images on my websites?

Thanks.

Hi @TelecatsNL,

Thanks for reaching out.

Since SVG is not the same as other images like JPEG or similar, the size retrievable is somewhat impossible since it’s a vector file. It’s not browser issue at all since when you insert an image from Media Library, Wordpress naturally serve image sizes as well (like medium, large, and full) and that’s not possible with SVG file. File size retrievable is not done through browser but server, the only available workaround for now is sizing it with CSS.

https://core.trac.wordpress.org/ticket/26256

But default, Wordpress doesn’t support SVG. Though, we’re not stopping on getting all possible workaround which, unfortunately, there is no fix available as of now since this is Media Library limitation, or PHP limitation https://stackoverflow.com/questions/6532261/how-do-you-get-the-width-and-height-of-an-svg-picture-in-php

Like chrome, it could decide which size it can render but that’s per browser and not related to media library where the size attribute is supposed to be pulled. But as browser updates, that feature can be removed by them.

And Wordpress has no feature that parses any SVG information at all since it’s not supported by default. Perhaps we could add our own parser but that means bypassing or not using Wordpress media library at all. And it would be slower, a trade-off just few SVG file and not the better way.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.