I'm trying to use SVG files directly from the Cloudinary Cloud.
It works perfectly with an <img> element:
But if I try to embed it in an <object> element (which I need for animating the svg) it doesn't work:
<object data="http://res.cloudinary.com/enomi/image/upload/test/example.svg" type="image/svg+xml"></object>
Instead the browser downloads the file automatically. Same happens if you just open the cloudinary url (
I additionally observed that response from the <img> request is a 'svg+xml' type, but the response from the <object> is a 'document' type and has a different size:
If I host the svg file on my own server and use nginx (including gzip and everything) it works with the <object> as expected.
Any idea what's happening there?
Thanks in advance,
Please sign in to leave a comment.