Copy link to clipboard
Copied
Hi,
On our website, we use SVGs that are exported from Illustrator. When we use them on some pages, it works.
ex: https://bib.umontreal.ca/communications/nouvelles/nouvelle/studio-enregistrement-lsh
But if we want to see only the image from the repertory, it is all turning black : https://bib.umontreal.ca/public/bib/images-dg/promotions/studio-enregistrement.svg
Is there a problem with the way we export our SVGs?
Thanks,
L-A
Hello @lagignacUdeM,
Sorry to hear about this experience. I agree with @thatsmauri. It seems to be an issue with "Content Security Policy" settings of the server where the SVG file is hosted. You need to contact your hosting provider.
This is not an issue with the SVG file itself. A workaround would be to generate the SVG file as follows:
Copy link to clipboard
Copied
There seems to be some sort of security violation going on.
I've downloaded your SVG, opened it up in my browser and it rendered correctly. When I open your .svg link and check the browser's console, it shows me these two errors:
To learn more about Content Security Policy, visit the site below:
Below is an example .htaccess file - please do not just use it "as-is" if you're not sure about this:
Copy link to clipboard
Copied
Hello @lagignacUdeM,
Sorry to hear about this experience. I agree with @thatsmauri. It seems to be an issue with "Content Security Policy" settings of the server where the SVG file is hosted. You need to contact your hosting provider.
This is not an issue with the SVG file itself. A workaround would be to generate the SVG file as follows:
I hope it helps.
Thanks,
Anubhav
Copy link to clipboard
Copied
Hi,
Yes, it works!
Thanks!
Laurie-Anne