NO BUG: SVG not being displayed propperly

Browser: Chrome 134.0.6998.118
OS: macOS

Hi,

I’m having issues with some SVG icons. In some cases, are not being displayed. I’m duplicating here, the same SVG and container and still is not visible. It’s happening in several places.

I tried adding another SVG and does not work either. Don’t know what to do in this case. I’ll be happy to share more info in case is needed.

Optimizing the icons with ImageOptim seems to work. I optimized first using https://optimize.svgomg.net/ and did not worked. I’m wondering what’s causing the SVG to not being displayed before optimization. Optimization makes them smaller and should be visible in all cases.

Hi @deryckoe.

Usually, the reason is SVG code itself. You can try comparing optimized version and unoptimized one, and you should see what the difference is.

Best regards,
Matej

1 Like

My fix these last few months for SVGs is to use Inkscape to remove the width and height attributes and replace them with the ‘viewbox’ attribute.

1 Like

Thanks, that seems to be the issue. It’s working fine now.

Hi.

As this is working now, and the issue was not related to Bricks, I’ll mark this topic as “no bug”.

Best regards,
Matej

1 Like