Images not showing up in hosted site

你说的曾经没有我的故事 提交于 2019-12-01 04:02:28

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.

Stepres stepres

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!