Random rendering of images in Phoenix

Working on a client website locally before releasing to digitalocean vps, and I’m starting to become a bit concerned about the number of times I’m seeing the wrong image render or an image not render unless I reload a page again.

If I right click and view the image, it will show the correctly referenced image by itself, and then again when clicking the browser’s back button.

I must be doing something wrong with paths or perhaps I’ve misconfigured nginx (as reverse proxy in front of phoenix)?

We do not know anything about your project nor your setup.

I have not had such problems you describe with my toyprojects, none of them has seen digital ocean though.

Perhaps you can provide an minified example of code that is failing in the way you describe it?

I’ve had some issues like that with images and they were because images are served from “private/static” and as I was placing them in “web/static” sometimes brunch didn’t work ASAP.
So, if you try to put images directly at the “private/static” and the problem disappears is because of that.

1 Like

Thanks, that makes sense, I’ll give it a try and write back later today.