代码之家  ›  专栏  ›  技术社区  ›  Moaaz Bhnas

加载资源失败:只有一个映像不工作

  •  0
  • Moaaz Bhnas  · 技术社区  · 6 年前

    当我将站点部署到github时,仍然显示所有图像,但有一个图像抛出错误:
    Failed to load resource: the server responded with a status of 404 ()
    即使它们都有相同的路径约定(即 images/img-1.png , images/img-2.png ……)

    文件夹结构:

    app
    ├── index.html
    ├── images
    │   ├── armin.png
    │   ├── arrows.svg
    │   ├── illumi.png // error
        ... other images
    

    Paths:

    <img src="images/armin.png"> <!-- Works -->
    <img src="images/illumi.png"> <!-- doesn't work! -->

    为什么会这样,怎么解决?

    0 回复  |  直到 6 年前
    推荐文章