I have a user profile page in my application when an application user can upload a profile image (maximum size is 5 MB). Using the original image, I generate three types of images and loading them s3 using paperclip.
Now the problem is that if the user uploads an image with a size of 5 MB, it takes time to process and upload this image to s3. By the time the user is waiting for the image to be updated.
If I describe this process, the user may not see the downloaded image for some time. Therefore, he may not know if the image is loaded or not.
I thought about partially processing the image to notify users, and then doing the rest of the image loading in the background, but not sure how we can do this.
Also, if generating and loading for one image for use by the user may take some time.
So what can I do in the above case? Or should I save profile images only on the server, not on S3.
source
share