I’m trying to set a “.svg” image as background-image using css, but it is not working. The url is valid and returns 200 status code and works on “.png” images.
What is the problem?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your IIS is most likely not configured with SVG as a content type, try adding
inside the
<system.webServer>scope of your web.config.This will of course only work if your application is the one serving up the
svg. If thesvgis not contained inside your application but in a separate directory of the web server, you’ll need to add the same mapping to your web server instead inside the “mime-types” tab.