How to download thumbnails of images stored in firebase using glide

依然范特西╮ 提交于 2019-12-11 04:56:24

问题


I want to download the images thumbnail not the entire image from my firebase storage. I am using glide to load the images but i am not getting how can i load image thumbnails as it will be quicker and memory efficient.


回答1:


You first need to create thumbnails for the images, likely using something like Google Cloud Functions or Google App Engine. You can write a function that takes the original image, and runs it through ImageMagick, then saves it back to Firebase Storage at a known location, say images/myImage_resized_<height>_<width>.png, which your client can then fetch.

Alternatively, you can use Imgix or Cloudinary to serve smaller images stored in Firebase Storage by providing our Download URLs to those services and fetching the images from there. If you're willing to do some more work, Google App Engine offers the App Engine Images API for free, which does many of the same things.



来源:https://stackoverflow.com/questions/42201695/how-to-download-thumbnails-of-images-stored-in-firebase-using-glide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!