SVG image in FileAttachment

Hi, I’ve experienced a strange behavior in See the last cell. When the notebook is not published, I can see the image with


But I get an error as soon as I publish the notebook:

Error: Unable to load file: SVG@1.svg

Hi @severo,

While I imagine you probably re-tested this already, just to confirm that the issue is reproducible:


Thanks for reporting and reproing! We have a fix in progress, but the problem occurs when we upload the file to S3; so files already uploaded will continue not to work after we deploy this fix and will need to wait for a backfill. I’ll update when we’ve deployed the fix so you can reupload the file to get it working in the meantime.

The issue is that sometimes we incorrectly set an xml content type on files that should be svg, which I believe our content security settings were then preventing from displaying.


This fix is deployed, if you reupload your SVG it should work correctly now.

We’re not going to backfill these to avoid changing behavior out from under anyone, but for anyone else experiencing this with SVG files uploaded before now downloading the file and reuploading it should give that file the correct content type.


Thanks for the quick fix and the explanation. It now works as expected.

1 Like