image not loading on vercel deployment

I m using react + vite , and the issue is that the destination page images r visible on my local host but when I deployed code on vercel the images don't load , I think it's a pathing issue but I m not sure what to do . Deployment: https://chet-space-tourism.vercel.app/ And the GitHub for repo is : https://github.com/Chet25/spaceTourism ;-;
GitHub
GitHub - Chet25/spaceTourism
Contribute to Chet25/spaceTourism development by creating an account on GitHub.
15 Replies
patrick
patrick•4mo ago
how are you importing the image in your file
CheT
CheT•4mo ago
So I have like image files in assets > images folder I have seperate images for seperate pages And there's a data.json which has like paths Depending on what u click The path dynamically comes and shoudn technically load
patrick
patrick•4mo ago
try importing the image in the file you want to use , then use them like this import Image from "../assets/images/image.jpg" then use it like . <img src={Image}/> try this
CheT
CheT•4mo ago
So I should import the images in file , make an array and dynamically change between them depending on my clicks Is that possible? I want them to change , the second nav bar switches the information
patrick
patrick•4mo ago
i don't really understand it but it sounds possible
CheT
CheT•4mo ago
As well as the image
patrick
patrick•4mo ago
yhyh. you can import all the images and dynamically change them that is possible
CheT
CheT•4mo ago
Hm that could work thx patrick Lemme try
patrick
patrick•4mo ago
yeah try and lemme know if it works. (it should)
CheT
CheT•4mo ago
:linux: @patrick it worked 🔥 thx U can see the deployment it works
patrick
patrick•4mo ago
yh i just checked glad i could help
CheT
CheT•4mo ago
Now I have to mark this post Solved right
patrick
patrick•4mo ago
probably. i'm not sure. haven't opened an issue before
CheT
CheT•4mo ago
Pro
patrick
patrick•4mo ago
oh no 😂