I work on a project with React.js and trying to make a form to upload some images:
But it took forever to upload all the images. So it should upload all the image on submit. Sometimes it works fine but sometimes seems like it never even upload a single image. If I set it to upload image on change, I afraid it will put to many unused image in imgur storage, but if I upload everything on one go, it took forever. Can anyone give me suggestion about how to speed up images upload?
How to speed up Imgur Image upload to API
Depends if you want to upload the original image "no matter what" or you are okey with resizing or compressing your image.
If you are okey with resizing, you could set a maximum resolution for each image, like 1280x960
, it would significantly reduce the file size, especially if images are e.g. 4K
.
If you are okey with compressing, you could convert the png
images into e.g. jpeg
using canvas
. It would also reduce the file size.