Revamp image uploading.
Probably using a cloud solution (Amazon S3, Cloudinary, etc.) for storing the images is a way better option.
Also, right now, when an image is selected by a user it gets directly uploaded to the server, regardless of if it's the one that ends up being used. The ones not used should be removed from the server somehow!
To fully fix this is issue, I think that one or a combination of the following two points will be necessary:
- Clean up the Cloudinary folder of images that aren't used anymore, for instance: old user avatars or uploaded images that ended up not being used.
- Keep a registry of who uploaded which image and have some sort of archive. This would be another model on the database.
It would also be nice to allow users to crop images before uploading them.
I think we should adapt the upload process so that, on development mode, images are saved on disk instead of uploaded to Cloudinary.