【问题标题】:Is it possible to apply GCS-style image transformations on Firebase Storage image urls?是否可以在 Firebase 存储图像 url 上应用 GCS 样式的图像转换?
【发布时间】:2016-12-09 10:17:12
【问题描述】:

据我了解,Firebase Storage 是基于 Google Cloud Storage 构建的。因此,是否可以在 Firebase 存储图像 url 上应用 GCS 样式的图像转换?

例如,是否可以执行以下操作:

将图像大小调整为 32 像素(保留纵横比):

http://lhx.ggpht.com/randomStringImageId

收件人:

http://lhx.ggpht.com/randomStringImageId=s32

代码/文档来源:https://cloud.google.com/appengine/docs/python/images/

【问题讨论】:

    标签: firebase google-cloud-storage google-cloud-platform firebase-storage


    【解决方案1】:

    是的,可以 100% 使用 Google App Engine get_serving_url() 调用,但您必须在 GAE 中设置一个端点才能这样做。

    如果您想要一个后端解决方案,我建议您查看Firebase Storage - URL for image services,它展示了如何使用 Cloudinary 或 Imgix 进行这些转换。

    【讨论】:

    • 这是否意味着 App Engine 将指向 Firebase 指向的同一个 Google Cloud Storage(如 s3 中的存储桶?),或者您是否必须在应用引擎中创建一个全新的云存储实例?
    • Firebase 使用默认的 GAE 存储桶,因此您不必创建新存储桶,只需使用现有的 App Engine 应用/存储桶即可。
    猜你喜欢
    • 2019-09-11
    • 1970-01-01
    • 2022-01-22
    • 2018-08-20
    • 1970-01-01
    • 1970-01-01
    • 2013-01-23
    • 2021-02-04
    • 2023-04-04
    相关资源
    最近更新 更多