Images not showing up in hosted site

后端 未结 3 651
面向向阳花
面向向阳花 2021-01-12 03:42

Thanks for taking the time to look at this, I\'ve researched as best I can but am not coming up with anything. I saw a similar stack overflow post about waiting for images t

相关标签:
3条回答
  • 2021-01-12 03:55

    It is probably because the src, rel, and href tags contain absolute urls which causes firebase issues while getting to the right file. What you must do is, get all the URLs to be relative, such as: images/image1.png you must do this even with your css and js links. Also, you must store every thing in a folder named public, or you will have to change the name to your directory while prompted in the command prompt regarding to use specific directory as public.

    0 讨论(0)
  • 2021-01-12 04:15

    After Redeploying a million times to no avail, I figured I had to troubleshoot and figure out what was wrong. I inspected the url for the file i.e. https://exampleApp.firebaseapp.com/img/myimg.png or whatever it is in your case. In essence my problem was simply case sensitivity. So instead of myimg.png the file was stored as myimg.PNG. So just check if that extension is your issue.

    0 讨论(0)
  • 2021-01-12 04:15

    So, I sort of solved the problem. Grunt's imagemin thing during the build process did "something" to the images that caused them to not display. I will figure out what eventually and hopefully remember to update this post in case others run into this in the future. But in the meantime just replacing the built images folder with the source fixed the problem.

    0 讨论(0)
提交回复
热议问题