Skip to content

Images not loading properly on github pages #80990

Answered by ananuness
mhmarina asked this question in Pages
Discussion options

You must be logged in to vote

Hii Marina! Actually I have some suggestions! The images are being used in Gallery.tsx, right?

  1. You can change the _URL_ to ../assets/artAssets/ and see if it works already, but also I would change the 15, 17, 20 and 22 lines because the image extension is in caps (just in case)

  2. You can import all images as components!! Just like:

import myImage from '../assets/artAssets/myImage.png';

And put it inside an array just like you did with the strings. I did something similar but using object notation.

I hope it helps! 😊 If not, let me know!!

Replies: 2 comments 2 replies

This comment was marked as off-topic.

Comment options

You must be logged in to vote
2 replies
@mhmarina
Comment options

@ananuness
Comment options

Answer selected by mhmarina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pages Host a static website, right from your repo Question
3 participants