Resize an image before uploading it to firebase

后端 未结 2 1829
离开以前
离开以前 2021-02-13 16:26

Firebase storage looks very cool and easy to use, but I\'m wondering if there\'s a way to resize an image before uploading it to Firebase Storage, e.g., run a proccess using Ima

2条回答
  •  长情又很酷
    2021-02-13 16:36

    You can also use Firebase Storage + Google Cloud Functions to upload an image, resize the image (using ImageMagick or similar), and write it back to Firebase Storage.

    I have an example using these together here (though I trigger the Cloud Vision API, rather than an image resizer).

    A quick side note: Firebase Storage doesn't have a Node.js client, instead we recommend using the GCloud-Node library.

提交回复
热议问题