Images problem for website

The images aren’t loading on my website help

https://hamadoplays.glitch.me

1 Like

Hi! Welcome to Glitch!

The reason the images are not showing is from how you are accessing them.

<link rel="icon" href="your-profile-image.jpg" type="image/jpg" />

The href attribute should instead refer to the cdn.glitch.global link.

<link rel="icon" href="https://cdn.glitch.global/8460961c-f837-4c4a-aee3-7db937c94cf5/your-profile-image.jpg?v=1733782570777" type="image/jpg" />

You can get these link in the Assets panel if you click on an image, then click Copy URL.

This should fix your problem!

1 Like

What about checkmark.png is it basically the same way?

Yep!
All of the images will be done the same.

I did it and still

From what I can see, it appears that nothing has really changed.

<img
        src="your-profile-image.jpg"
        alt="Profile Picture"
        class="profile-img"
      />
<img src="checkmark.png" alt="Checkmark" class="checkmark" />

Try changing those to:

<link rel="icon" href="https://cdn.glitch.global/8460961c-f837-4c4a-aee3-7db937c94cf5/your-profile-image.jpg?v=1733782570777" type="image/jpg" />

and

<img src="https://cdn.glitch.global/8460961c-f837-4c4a-aee3-7db937c94cf5/checkmark.png?v=1733782645239" alt="Checkmark" class="checkmark" />

If the code isn’t saving the changes you make, try reloading the editor.

Ok I did it ChatGPT helped :sweat_smile:

1 Like

Also note that if you look at your images in the Glitch editor, it has a “copy URL” button for getting the correct URL to use in your HTML files.

Images end up in a special location so that they don’t take up any of your project’s limited space, and so that requests to them don’t need to unnecessarily wake up your project, eating up your limited project hours.

1 Like