【问题标题】:Images folder not loading from Github repo to Github Pages图片文件夹未从 Github repo 加载到 Github Pages
【发布时间】:2021-05-03 09:23:26
【问题描述】:

Github 页面上托管的网站链接:https://rohanchoudhary.in 仓库链接:https://github.com/therohanchoudhary/Portfolio-Rohan/

当您尝试检查元素时,它不会加载图像文件夹。

【问题讨论】:

    标签: github-pages


    【解决方案1】:

    请将您的图像文件扩展名从大写更改为小写。例如:

    <img src="./images/rohan.jpeg" alt="Rohan Choudhary Profile Photo" class="profile-image">

    而不是

    <img src="./images/rohan.JPEG" alt="Rohan Choudhary Profile Photo" class="profile-image">

    【讨论】:

      【解决方案2】:

      我检查了你的代码,你的图片文件名有拼写错误。

      图像https://rohanchoudhary.in/images/cloud.PNG 在存储库中不可用,而是在存储库中提供图像https://rohanchoudhary.in/images/cloud.png

      这会给您一个404 File Not Found 错误。

      所以你需要解决以下问题:

      <img src="./images/cloud.PNG" alt="cloud-img" class="bottom-cloud">
      

      收件人:

      <img src="./images/cloud.png" alt="cloud-img" class="bottom-cloud">
      

      只需正确重命名所有图像,您的错误就会得到解决。

      【讨论】:

        猜你喜欢
        • 2020-09-03
        • 1970-01-01
        • 2019-11-13
        • 2021-02-05
        • 1970-01-01
        • 2021-12-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多