I had some problems loading images in my app, and since my app was on an older version of Remix, I just decided to start from scratch with the new Vite/Remix template. However, after moving my code over to the new project I still cannot see my images in deployed versions of my app, but everything works fine on localhost. My deployed apps are on fly.io.
I have some images:
- app
- assets
- images
- logo.jpg
- symbols
- completed.png
Which I import like this:
import Completed from "@/assets/symbols/completed.png";
import logo from '~/assets/images/logo.jpg'
I also have an image in:
- public
- other_logo.jpg
Which I use as:
<img src="/other_logo.jpg" alt='Logo' className="w-[32px] mr-2"/>
And it too works on localhost but not when deployed.
Any suggestions on where to start looking for the problem?