Test Environment returning a 404 on an image

An image in my Navigation layout heading is working fine when running locally; however, it's missing when running in Test. The server is returning a 404 on the image https://myserver-test.mendixcloud.com/logo.png. I tried renaming the image in the modeller and redeploying, but it had no impact. Any ideas on cause / solution? I suppose I could drop & re-add the asset.
2 answers

Hi Rob,


How did you add the image to your project?

You should use the modeler to manage the files, instead of placing it somewhere in a directory yourself.

Add an image collection to your module and add the desired image to the collection.

Then use the image from the collection in your lay-out.




I'm getting to the root of the issue: navbar-brand in lib.css has background-image: "../../../logo.png". It also sets display:none to .navbar-brand img

In my local instance, I have a logo.png in the root of my Mendix that is equal to the image I uploaded against the action link in the top bar of the navigation layout. I'm quite certain that I did not put it there and it's this image that's missing in the Mendix Cloud deployment.

I find it odd that navbar-brand explicitly calls out a background-image in the file system.

I have a couple of possible workaround: Override the background-image inside of .navbar-brand in custom.css to reference an image elsewhere in the file system (e.g. inside Themes). Alternatively, re-work the style to not use a background-image but rather the img object that does directly reference the image in the Modeler library.

Does anyone understand the workings of the navbar-brand class?