I am having issues adding SVG files from the media picker , I can add svg files into the media library as I removed the svg file extension from the umbraco.settings config . But when I add the svg file in through the media picker on a grid or on a logo , the file either does not appear or appears as a very small image , like a thumbnail
My apologies, I tested on 7.6+ not 7.5. Either way I see no release notes of it being fixed, so maybe it is intermittent or inadvertently affected by something else?
Could this be an instance of the IE + SVG bug I've come across before?
If I'm not mistaken, to get SVGs to render correctly in IE browsers, there’s some tweaks you need to make to the .svg file in a text editor before upload.
If you open your SVG in a text editor you'll see some code like I've pasted below. It will likely be missing the height and width tags which IE needs.
Old mate IE won't scale up unless it has a maximum scale size (in pixels) specified in these values. You will need to calculate them by using the last two viewBox values to scale up to your largest expected use size (being sure to keep your aspect ratio).
SVG Files in Umbraco
Hi
I am having issues adding SVG files from the media picker , I can add svg files into the media library as I removed the svg file extension from the umbraco.settings config . But when I add the svg file in through the media picker on a grid or on a logo , the file either does not appear or appears as a very small image , like a thumbnail
Please can you advise how to add svg files
Thanks
Hi Rozelle
Did you find a way how to do it? Please, share with our community.
Thanks,
Alex
Hi
I haven't find a solution yet , still looking into it , I was hoping someone would know on these forms .
Thanks Rozelle
What version of Umbraco are you testing this on? I just quickly tested on 7.5+ and it is working fine for me.
Hi
Version 7.5.6 , Do I need to upgrade ?
There is a related issue to this here http://issues.umbraco.org/issue/U4-9349
My apologies, I tested on 7.6+ not 7.5. Either way I see no release notes of it being fixed, so maybe it is intermittent or inadvertently affected by something else?
I have no problems on 7.7.2. Do you have any plugins installed that have a css rule hitting your svg?
Could this be an instance of the IE + SVG bug I've come across before?
If I'm not mistaken, to get SVGs to render correctly in IE browsers, there’s some tweaks you need to make to the .svg file in a text editor before upload.
If you open your SVG in a text editor you'll see some code like I've pasted below. It will likely be missing the height and width tags which IE needs.
Old mate IE won't scale up unless it has a maximum scale size (in pixels) specified in these values. You will need to calculate them by using the last two viewBox values to scale up to your largest expected use size (being sure to keep your aspect ratio).
eg.
[svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 649.5 343.3" style="enable-background:new 0 0 649.5 343.3;" xml:space="preserve" width="786" height="415"]
is working on a reply...