简体   繁体   English

Heroku在图像上给出404

[英]Heroku giving 404 on image

I just deployed an app through Heroku and while the background images are displaying the element images are not. 我只是通过Heroku部署了一个应用程序,而背景图像显示的元素图像却没有。 I am getting a 404 error. 我收到404错误。 Seeking help, please. 请寻求帮助。

Basically, when you deploy the web app to heroku. 基本上,将Web应用程序部署到heroku时。 It tries to minimize and precompile all files and store them in assets folder(or different folder name) with different names. 它尝试最小化和预编译所有文件,并将它们存储在具有不同名称的资产文件夹(或其他文件夹名称)中。 I do not know what kind of framework you are using for your website. 我不知道您的网站使用哪种框架。

If you are using Ruby On Rails framework, I recommend that you create images folder in public and store all your images here (this is the easiest way). 如果使用的是Ruby On Rails框架,建议您在公共位置创建images文件夹,并将所有图像存储在此处(这是最简单的方法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM