Bug - Uploading SVGs - Browser issues

When uploading SVGs into the media library, Prismic is changing the stated dimensions of SVGs.

Firefox (worst case): Uploads them as 0x0 objects - will not display the SVG when it's on the page.
Chrome (medium case): Uploads the image but changes the dimensions to ~150px wide. Works on page, but is teeny tiny if you don't / can't place a width:100% on the SVG object.
Safari (best case): Uploads the SVG without altering it's sizing.

Frustratingly, downloading the uploaded files doesn't have any difference - the files are exactly the same. But you can see Primisic reporting the sizes here, and it does affect the way the image is rendered when placed onto a page.

Any ideas?

Hello Karl, thank you for letting us know about this. I've reported this to the relevant team. Until we find a solution to this problem, we suggest that you continue to use safari as the default browser when you want to upload SVG files.

Sorry to butt in here, but does the same thing happen when optimizing the SVGs? Not in Prismic’s case, but I usually run my SVGs through the following tool and I’ve had instances where other CMSs “choked” on the files but fared fine after running them through:


I'm not sure how that tool works with this type of file, but for the moment, Prismic doesn't optimize SVG images.

It's important to note this because it's impossible to add Imgix transformation parameters as you can do with other types of files: jpg, png, etc.

This thread is being monitored as an open ticket in the internal Prismic issue tracker. The Prismic support team will update this post as we get more information from our dev team. If you have a similar use-case, you can ‘Flag’ this topic to reopen and add it here.