html - Pictures not showing up on Heroku?

后端 未结 9 1702
说谎
说谎 2021-01-15 09:09

I deployed my static HTML website to Heroku using this tutorial (http://www.lemiffe.com/how-to-deploy-a-static-page-to-heroku-the-easy-way/) and my pictures won\'t show up ?

9条回答
  •  旧巷少年郎
    2021-01-15 09:26

    Your tag is pointing to an absolute path that exists on your local filesystem, but does not exist for your Heroku app. Instead, provide a relative path (relative to the HTML file invoking the tag, that is) to your image asset, commit the change to version control, then redeploy to Heroku.

    Assuming that your public directory is actually nested within the resumeappcopy directory, the following path should work:

    PUSA-Icon
    

    UPDATE:

    Note that the cited asset URL points to an asset with the file extension PNG in uppercase. However, the file's actual file extension is pngin lowercase (see here). Your local filesystem is probably insensitive to case when looking up a resource – but Heroku is not. You'll need to ensure that you're properly invoking the correct casing for resources when you deploy to Heroku.

提交回复
热议问题