图片未显示在托管网站中 [英] Images not showing up in hosted site

查看:60
本文介绍了图片未显示在托管网站中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您抽出宝贵的时间对此进行研究,我已尽力进行了研究,但未提出任何建议.我看到了一个类似的堆栈溢出信息,关于等待图像完成处理,但是我已经等待了大约2.5个小时,并且图像仍然丢失.

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 to be done processing, but I've been waiting for about 2.5 hours and the images are still missing.

我正在将Anglefire与Firebase一起使用.我正在使用grunt build创建一个dist文件夹,这就是我要部署到Firebase的内容. dist文件夹包含一个images文件夹,firebase表示它在部署时正在上传780个文件(在我添加图片之前,它大约为25个).

I am using angularfire with Firebase. I am using grunt build to create a dist folder and that is what I am deploying to Firebase. The dist folder contains an images folder and firebase says it's uploading 780 files when it deploys (before I added the images it was about 25).

但是,图像似乎没有显示出来.网址格式为my-app.firebaseapp.com/images/image-name.jpg

However, the images just don't seem to show up. The URL pattern is my-app.firebaseapp.com/images/image-name.jpg

我的firebase.json文件如下所示,这很简单.

My firebase.json file is shown below, it's pretty basic.

{
  "firebase": "<redacted>",
  "public": "dist",
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ]
}

该应用程序本身可以很好地部署并且可以正常工作,所有图像都只是404.对于我所想不到的最基本的东西,我事先表示歉意.

The app itself deploys just fine and works, all the images are just 404ing. I apologize in advance for what I am guessing is something very basic that I'm missing.

推荐答案

重新部署一百万次都无济于事后,我认为我必须进行故障排除并找出问题所在.我检查了文件的网址,即 https://exampleApp.firebaseapp.com/img/myimg.png 或您遇到的任何情况.本质上,我的问题只是区分大小写.因此,该文件不是myimg.png而是存储为myimg.PNG.因此,只需检查扩展名是否是您的问题即可.

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.

这篇关于图片未显示在托管网站中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆