SVG showing black this SVG uploaded to Cloudflare is showing black. Is this to do with hush? how can I overcome this?


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.