Question

Images from css file are not loading when host my static files on digitalocean spaces.

I have some images in my static file img folder but images that I am using in my scss as background images background: url('/static/img/hero.jpg') are not loading when I host my static file on digitalocean space. but it works if i not host my static files to digitalocean spaces and also works on my development server. I don’t know what is the problem. can someone help me out it’s a bit urgent?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Put that images file inside the SCSS file and than… use; background: URL(“…/filename/image/image.png”);