SVG content doesn't show
I'm running Apache2 on my Linode and I use SVG images on my website. When I view my site offline, they show up. But when I upload the index.html I get a 404 Not Found error.
img src="icons/instagram.svg"
I already created an .htaccess file in the root of public_html with this content:
AddType image/svg+xml .svg .svgz
But it still doesn't show.
What do I have to do to resolve this?
1 Reply
If adding that line in your .htaccess file doesn't work, you may want to verify that the MIME type is added directly in your Apache configuration file.
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</IfModule>
Other options may be that the file doesn't exist in that directory (perhaps it wasn't uploaded properly) or there isn't sufficient privileges to access that file.