Images are not found in public when using NGINX proxy

according to all the known instructions, I have images in my public/images folder of my Meteor project.

In the template I use it according to given instructions too e.g.:

<img src="images/{{semaphoreColor this.test_result_short}}.png" class="semaphore">

This works fine (semaphoreColor helper implemented) in my development and also when deployed to server (e.g. Images are nicely displayed.

When I try to setup NGINX reverse proxy to, the images disappear, as they are not obviously found on the client where they are located. The app is still looking for images without the “test” path (i.e /images/ but not /tests/images), while the other stuff like css and js codes is being processed fine (under /tests).

Is this expected to work or any experience with similar setup?

Thanks a lot

Have you tried setting your ROOT_URL to the full reverse proxified URL?


Have you tried referencing the images with an absolute path? (leading /)

<img src="/images/{{semaphoreColor this.test_result_short}}.png" class="semaphore">

Thank you guys for giving hints. Unfortunately non of the two worked, but they led me to a workaround.

<img src="{{absoluteUrl}}/images/{{semaphoreColor this.test_result_short}}.png" class="semaphore">

I added {{absoluteUrl}} helper which returns Mongo.absoluteUrl() without trailing slash (Mongo.absoluteUrl returns the ROOT_URL). This works fine, so far.

Once again thanks for hints. Very appreciated!