Skip to content Skip to sidebar Skip to footer

Background-image Not Showing When Uploaded To Server

Having a problem with an svg file not showing up in my background after its been uploaded to a server I'm using. Made sure the file permissions allow it to be readable on the serve

Solution 1:

Make sure the SVG file is delivered with the correct MIME type. Open the developer tools, go to the Network tab and load your page. Open the URL of your SVG file and make sure the Type column says image/svg+xml.

If the MIME type is not correct, then add the following line to an .htaccess file in an ancestor directory of your SVG file:

AddType image/svg+xml svg

(assuming the server supports .htaccess files).

Solution 2:

You probably have the wrong file path. Press F-12 to open the debugger, open the NETWORK panel and reload the page. Look for a 404 error on that filename.

Post a Comment for "Background-image Not Showing When Uploaded To Server"