#Wierd Error

5 messages · Page 1 of 1 (latest)

delicate thistle
#

Guys iam having some issues wifth the images, im changing the image src via an state , but the thing the images are getting their correct in local environment! i
path is local environment is

src/images/image-product-1.jpg
paths when i hosted it on netlify
/assets/image-product-1.0c6fe8e3.jpg

there is a main image(large image) and 4 small images, whenever user clicks the small images, it shows up in the main-image(large image). i need help guys!

rugged portal
#

Hello @delicate thistle, that's because you're not placing your images in the public directory.

delicate thistle
#

i have to change the src of main image with small images when any of the 4 images are clicked

rugged portal
#

you have to place all your graphic resources into public

delicate thistle
#

the code works on local environmet but when hosted it breaks the src