Skip to content Skip to sidebar Skip to footer

Photos Won't Load And Links Are Dead

So I hosted my website on netlify with my github repo. All of my photos and files used in the site are there but they will not load. Only my index.html and style.css that is outsid

Solution 1:

'C://' refrences, or local refrences, do not work online. Aside from this, using spaces in your webpage name and file name is not recommended, as some browsers may not support spaces or will convert them to the web standard, a '+', or the unicode standard for space (U+0020) so that more actions can be performed on them.

FIX:

Swap src="C:/Users/david/Desktop/Blog/Images/How to get more wins in Fortnite.png" with src="Images/How to get more wins in Fortnite.png"

to fix your problem and render the photo correctly, assuming your browser doesn't object to the spaces.

Solution 2:

I had the same problem my photos were saved in assets wasn't displaying in the netlify page and also while refreshing the page it showed like page not found . For these 2 problems I used the following steps.

Step 1:

Use _redirects file inside Public folder having the following code /* /index.html 200 which helps to redirect to your page. After adding that file use npm run build so that will be updated in build folder.

Step 2:

To show the images I've created a folder inside build folder named admin and inside that folder I've pasted the folder named static which was available inside build folder.

Hope this might be helpful in some cases!

Post a Comment for "Photos Won't Load And Links Are Dead"