Resize an image before uploading it to firebase

后端 未结 2 1854
离开以前
离开以前 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:30

    Resize using JavaScript Client-Side-Processing

    We're using JavaScript resizing, which uses clients device processing power to resize the image, and works GREAT, saving us space and money, saving the netwrok unnecesary bandwidth, and saving the client a bunch of time and also money in most mobile cases.

    The original script we are using came from here, and the procedure to use it is as simple as this:

    
    
    
    

    I believe that guy (dcollien) deserves a LOT of merit, so I would recommend you to vote his answer up.

提交回复
热议问题