html - Pictures not showing up on Heroku?

后端 未结 9 1697
说谎
说谎 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:27

    In summary, to properly load the images:
    1) Use relative url path relative to index.html
    2) image file extension needs to be png instead of jpg, and write it in lower case, eg: "cat.png"

    0 讨论(0)
  • 2021-01-15 09:28

    The only answer that hits the nail right on the head: Heroku is case-sensitive!

    Took me half a day to figure that out!

    0 讨论(0)
  • 2021-01-15 09:32

    Well , whenever your Web-page's contain HTML, CSS and JavaScript , so follow just 2 steps :

    1) Make one file give name as index.html (keep evreything in it) ex:script,stylesheet & body.

    2) Now, change these file, copy and paste these same file but change domain to index.php

    Then deploy on a Heroku , Keep your images downloaded in one folder with index.html

    Hence this method will help you to deploy your Web-Pages

    0 讨论(0)
提交回复
热议问题