I'm trying to use an .svg-image as background via CSS in a Confluence plugin. When I try to access it the browser gives me a download link. Could it be that the mime-type for SVG is not setup correctly? If so how do I add it?
Thanks in advance!
Community moderators have prevented the ability to post new answers.
Okay, internet tells me this has been an issue for some time, I'd be very happy just having the mime-type added to the servers list of supported file types. Which would probably solve my issue.
But anyhow, I ended up embedding the svg directly in my CSS, much like you'd do when embedding png's.
.bg { background: url('data:image/svg+xml; ... '); }
Plus, I found this article suggesting that embedding them in utf-8 is better than converting to base64:
https://css-tricks.com/probably-dont-base64-svg/
Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.