我应该将网站的图片存储在 heroku 上吗?
我应该将网站的图片存储在 heroku 上吗?
图像,例如我网站的徽标等。 我只谈论网站设计的图像。
它会影响我的网站性能吗?
Should I store my site's images on heroku?
images such as the logo of my site and so on.
I talking just about the images of the design of the site.
Will it affect my sites performance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是。您的徽标和构成网站的其他相关图像不应太大,并且不会对您的 slug 大小或轻微性能产生太大负面影响。
单独存储和提供这些资产的缺点是您的应用程序不会全部放在一起,这给开发增加了额外的难度,因为您必须在与代码不同的位置更新图像。
用户上传的任何大文件(不是应用程序本身的一部分而是由应用程序存储)都应该存储在 S3 之类的东西上(无论如何你都不能写入 Heroku FS)。
Yes. Your logo and other associated images that make up the site should not be terribly large, and will not negatively affect your slug size or slight performance much.
The downside of having these assets stored and served separately is that you application will not be all-together, which adds an extra layer of difficulty to development, as you have to update images in a separate place from your code.
Any large files uploaded by users, that are not part of the application itself but stored by it, should be stored on something like S3 (not that you can write to the Heroku FS anyway).
通常,我的应用程序的核心内容(即用于布局、徽标等的图像)我会提交到 git 并将部署到 Heroku - 上传的图像/pdf 等资产都会转到 Heroku
typically anything that is core to my application (ie images for layout, logos etc) I commit to git and will deploy to Heroku - assets like uploaded images/pdfs etc all go to Heroku