Reputation: 2011
I'm attempting to load a PNG through a CSS background-image
property:
background-image: url("../../img/lp-background/lp-properties2.png");
This is what the browser shows me when I deploy the app to an app-service:
But the image loads perfectly on localhost. The image is on my app server:
Why would this be happening?
I've tried: - Renaming the files - Moving the files - Deleting and re-adding the files between deployments - Redeploying to another pap service
Upvotes: 0
Views: 790
Reputation: 654
As the Content folder is capitalised, if you are on Windows then this is case insensitive, but when you push out to Azure if it is a case-sensitive file system (e.g. Linux) then the capitalisation will matter.
Upvotes: 0
Reputation: 163
You could try using an absolute path in your code and see if that helps.
background-image: url("COMPLETE PATH HERE/img/lp-background/lp-properties2.png");
Upvotes: 1