🐛 [Bug] Cropped images, at the moment, are much larger
Created by: Tirokk
Authored by mattwr18 Closed
🐛 Bugreport
this can cause several issues
- we run out of persistent storage space and must pay for more, or not be able to store uploads
- as @alina-beck points out on
discord
"not everyone is on a superfast (or cheap) internet connection "
Steps to reproduce the behavior
- go to
/post/create
- upload an image, crop it, and save the post
- check the size of the image in
backend/public/uploads
- ...
- Profit
Expected behavior
Possible solutions as reported on discord
@alina-beck points out a good solution: image compression "that's why I suggested to do the compression on our side – no frustration for the post authors who can't upload their big images and no frustration for users who want to view the posts and need to download the images
"
@vardyb gives some good short term solutions, while agreeing with @alina-beck: "I think with cropper.js you can set a max width, which may also help with file sizes, in addition to using the jpeg format. we could also play around with the compression values for jpeg.
"