简体   繁体   中英

SVG images are not loaded on the page

I have a website hosted on Amazon S3 (static website hosting). All other features are working but weirdly, SVG images are not loading. Images are located in the sub directory of the site and path is correctly used. Please help me how to fix this issue.

Please go to the S3 bucket where your website is hosted and select the svg file that you are having problem with. Go to Properties > Metadata, you will see its content-type is set to different value than image/svg+xml (octet-stream now) Change it to image/svg+xml and reload the page.

In my case,my svg file missing value xmlns="http://www.w3.org/2000/svg" in svg tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM