将上传的图片转换为缩略图 +斑点存储区

发布于 2024-12-03 11:06:01 字数 250 浏览 8 评论 0原文

问题:

  1. 在 Google App Engine Blobstore 中,有没有办法将上传的原始图片转换为缩略图?

  2. 将图片转换为缩略图是一个好主意还是有更好的方法?

  3. 如果我想使用缩略图和普通图片,最好的优化是什么?我的意思是,我是否应该浪费额外的存储空间来存储缩略图?

性能非常受青睐。预先感谢愿意提供帮助的人!

Questions:

  1. In Google App Engine Blobstore, is there a way to convert the original picture uploaded to thumbnail picture?

  2. Is converting the picture to thumbnail picture a good idea or there are better ways?

  3. What are the best optimization if I wish to use thumbnail picture as well as normal pictures? What I meant is that, shall I waste additional storage just to store the thumbnail pictures?

Performance is preferred very much. Thank you in advance for who's willing to help !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘东忘西忘不掉你 2024-12-10 11:06:01

您不一定需要存储额外的图片缩略图版本。请查看 get_serving_url()

您可以使用该函数生成一个带有参数的图片的“公开但不可猜测”的 URL,以便动态调整大小,并且它针对性能进行了优化。我认为它非常适合您的需求。

You don't necessarily need to store additional thumbnail versions of pictures. Check out get_serving_url().

You can use that function to generate a -public, but not guessable- URL to the picture with parameters to do resizing on the fly and it's optimized for performance. I think it's well suited for your needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文