Has anyone encountered problems using SVGs in an Umbraco site? I think I'm running into some sore of caching issue?
OK ... So I can upload an SVG and see it's preview in the media section, but it's not rendering in the browser once the page is published?
If I review the code for the published page the link is present in the code AND it's correct ... if I open that new link in a separate browser window the SVG renders without issue. What's even weirder is that after I open it up in a separate browser window the SVG appears in the published page layout. BUT then it disappears again ... 5-10 minutes later it's gone again.
Is this some kind of weird caching issue?
I think this is definitely over my head ... I'm running v7.6.2 ... any help-insight here would be appreciated.
For right now, to resolve this, there's nothing complex-dynamic going on ... I'm dropping it right into the layout treating the svg as an "image" like this:
However, when I drop it into an object tag it's good to go ... maybe it's tied to the whole security issue. I read somewhere that img tags with SVGs might be disabled.
As soon as you said "how do you render SVG images" I remembered that there's more than one method to do so. Luckily this is an area of my client's site that will NOT be included in the CMS so I can do whatever I prefer to get the job done.
switching from img tags to object tags did the trick, and I'm back in business.
Has anyone encountered problems using SVGs in an Umbraco site? I think I'm running into some sore of caching issue?
OK ... So I can upload an SVG and see it's preview in the media section, but it's not rendering in the browser once the page is published?
If I review the code for the published page the link is present in the code AND it's correct ... if I open that new link in a separate browser window the SVG renders without issue. What's even weirder is that after I open it up in a separate browser window the SVG appears in the published page layout. BUT then it disappears again ... 5-10 minutes later it's gone again.
Is this some kind of weird caching issue?
I think this is definitely over my head ... I'm running v7.6.2 ... any help-insight here would be appreciated.
Hi Brett
It looks like an issue isn't related to Umbraco. How do you render SVG images on your site?
Can you share code with us?
Thanks,
Alex
Hi Alex ... thanks for jumping in.
For right now, to resolve this, there's nothing complex-dynamic going on ... I'm dropping it right into the layout treating the svg as an "image" like this:
However, when I drop it into an object tag it's good to go ... maybe it's tied to the whole security issue. I read somewhere that img tags with SVGs might be disabled.
I'm using Google Chrome Version 58.0.3029.110 (64-bit). I've never encountered an issue like this before with SVG.
As soon as you said "how do you render SVG images" I remembered that there's more than one method to do so. Luckily this is an area of my client's site that will NOT be included in the CMS so I can do whatever I prefer to get the job done.
switching from img tags to object tags did the trick, and I'm back in business.
Appreciate your help Alex, thanks again.
Works great for me. Thank you.
is working on a reply...