Home
Support Forums

Images not loading after deployment

Please, my images are not loading after deploying my site. I don’t know where the problem is but I would appreciate your help and assistance. What can I do to rectify the issue?

Hi @Faith

In order to offer you assistance, you need to provide the URL to your site.

inspiring-goodall-66d8f6.netlify.app
This is the url

One issue is the image path src="../images/" as this is beyond the root of your site. Suggest you change theses to src="/images/"

As you are also using Large Media, I suggest reading [Support Guide] Troubleshooting your Netlify Large Media Configuration.

I’ve changed the src and it’s still the same.
Also, I tried reading the guide but I don’t understand it. Can you explain to me what I should do instead.

Given you have one image (which is used twice on the page) I suggest you have little need for using Large Media/LFS. I suggest you put the image in the root of you project/site and load it normally (e.g. <img src="/myimage.jpg">.) If it is a large image, resize it appropriately, and use a tool such as Squoosh to optimise it.

I have two images in the website.

So in essence, I should just put <myimage.jpg>
I don’t understand the part of putting the image at the root of the project and the loading normally

Apologies. Yes.

So you would have this file structure

.
├── faith.jpg
├── hng.jpg
├── index.html
└── style.css

then your image tags would look like

<img src="faith.jpg">

<img src="hng.jpg">

as all the files are in the root of your project/site.

Yes thank you. I just got it