Heroku显示了一些图像,而不是全部

时间:2019-10-19 13:21:15

标签: php image heroku

我已经将一个旧学校的年鉴项目上传到了Github。在本地该项目很好。

但是,当通过Heroku部署时,仅显示二十个图像中的两个-其他仅显示替代文本。它们可以正常运行(重定向到所选页面),但是不可见。

我想念什么?

<li class="collection-item">
                    <div class="person">
                        <a href="Abdellatif El Mandili.html"><div id="photo1" class="photo"><img class="photo" 
                        src="Photos/Abde.PNG" alt="Photo d'Abdellatif El Mandili"/></div></a>
                        <p id="name1" class="name">Abdellatif El Mandili</p>
                    </div>
                </li>
                <li class="collection-item">
                    <div id="person2" class="person">
                        <a href="Alexis-Mathieu Hubert.html"><div id="photo2" class="photo"><img class="photo"
                                src="Photos/Alexis.PNG" alt="Photo d'Alexis.PNG" /></div></a>
                        <p id="name2" class="name">Alexis-Mathieu Hubert</p>
                    </div>
                </li>

上面的代码显示的代码应显示为两张照片和该人的名字。只能看到“ Abdellatif”,而未加载“ Alexis”照片。还有其他17个人,例如Alexi,还有其他个人,例如Abde。我确定每个列表元素的所有代码都相同,那是什么问题呢?

文件为index.php

还有主意吗?

1 个答案:

答案 0 :(得分:0)

好的,我发现将图像上传到图像托管站点,然后使用直接链接是可行的。我不明白为什么以前没有显示图像,但是至少此解决方案将来可能会对其他人有所帮助。