I have added a few images in src/components/assets/media/images
folder but when I am deploying to the Vercel application I am not seeing those files as deployed. It is still showing old set of
files.
These images/png files are there in github and deployment is happening from the same location but I checked it’s not there in deployment.
I don’t understand how to get the path of these logos to be included in external json which is available in monngodb
I am thinking maybe those files are never used in the application that’s why they are appearing in asset_manifest.json.
The existing files are appending a hash before the extension.
2
Answers
Your images are not in the correct folder or have the wrong path.
Vercel expects your static assets to be in a folder called public at the root of your project, and you should reference them with a slash (/) at the beginning of the path.
(ex) If you have an image called logo.png in the public/images folder, you should use
in your code. Make sure your images are in the public folder and not in a subfolder like
Did you build the project before deploying:
If so, try a hard refresh after deploying. The old images might be cached.
On a Mac using Google Chrome…. open the inspector, then hold the control key then click the reload button then select "Hard Refresh". or just press Control + Command + R
If you want a button for testing,
Try the following:
If you are using Typescript and get an error, add the following before it like this:
You need true. Without it, it’s just a refresh. The browser won’t reload the cache from the server.