Images not showing up on firebase hosted website

陌路散爱 提交于 2019-12-10 15:54:52

问题


i run command firebase deploy in my Project/public folder which contains index.html, main.css and an images folder, my webpage is hosted but images are not showing up in my webpage.


回答1:


I faced the same problem. Resolved it by providing relative path urls

example: Instead of using img src="User/local/..../img/pic.png use img src="img/pic.png"

where img is folder in public directory containing all the images

Since firebase console is reading your page from public directory,( which you might have created after all the coding done in some other folder)so changing the parent folder will not effect the webpage images if you use relative path of image.

Now use firebase deploy.



来源:https://stackoverflow.com/questions/36650639/images-not-showing-up-on-firebase-hosted-website

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