Images not getting loaded when called from css in Mendix 8

0
Hi Team, I am facing an issue with the images, as they are not getting loaded when called from css after updating the project to Mendix8. I am providing the url for the background as background: url(“/img/image_bg.png”) no-repeat center center fixed;  but getting the error as 404(not Found). I have tried changing the url path but couldn’t succeed. Please help me out as where i am going wrong. Thanks in Advance!
asked
3 answers
0

Hi Sushuma, 

Is your background image in the Mendix/ProjectName/theme/img folder? And can you try to use the folowing css code:

background: url(“../../../img/image_bg.png”) no-repeat center;

I hope it works.

Kind regards,

answered
0

the default root directory for images placed in the themes/img folder (for mx7) should be:

background-image: url(../../../img/image.jpg);

(Depending on how your sass is structured)

give it a try :D it should still work the same, or maybe 1 less “../” :D 

answered
0

Hi All,

Thanks for your answers. I tried as you people mentioned before posting here. But the actual issue was with the image names generated in the deployment – web -img folder. When trying to access the images which were uploaded from Mendix a prefix is getting appended like ModuleName$Image_collection$ImageName in newer version of Mendix. Previously it is like ModuleName$ImageName. So due to this, it is unable to find the image.

But, Thank you all for your help!

answered