SVG showing black

https://imagedelivery.net/YccOAjWLTnDVwCkdeA9L4A/0b1f6ba7-538f-4878-bfed-572d7c7c9800/public this SVG uploaded to Cloudflare is showing black. Is this to do with hush? how can I overcome this?

Thanks

Yes, the reason your SVG is showing as black is because the Content-Security-Policy applied disallows inline styles. (I saved your file locally and it displays just fine as delivered; just not in a browser.)

The documentation as well as the blog post announcing SVG support both talk about forbidding various things in SVGs for security reasons, but they don’t mention inline styles, just remote style URLs. But the CSP default-src 'none' is what’s causing this.

So, I think you’ll have to serve your SVG from your server.

1 Like

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