-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix funny compression (ABA-827) #1157
Conversation
I haven't tested, but this looks promising. What I don't understand is why this suddenly started happening? Also, I believe there's compression on gallery images as well, but the image uploader for that is outside of lego-editor, which makes me suspect there might be something else causing this? I've checked AWS, and there should be no compression on their side. Should probably investigate that further though |
I believe image size has always been related to the size of the crop viewport, but the insane compression is definitely someting new. |
Will this cause overflow issues if someone uploads very large images? Maybe we should have some maximum size, or maybe rather limit it in backend or just when displaying the images in the editor. |
I assume the final size used to be determined by the
Might be, I've only looked at the images which have had this issue (org-kart), and the fix looks promising.
Agreed. 🙌
One way to find out 😉. Should be easy to see if this has to be fixed in staging |
Have you looked at this?
And this |
Merge first, check later 😎, approve pls |
b868afc
to
ab6c89b
Compare
what? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Definitely needs some more testing, but I think doing it in staging is ok. I think any image size limits we need to implement should be done on backend anyways.
For some reason, image size was determined by the crop viewport 🙃
This means cropping a large image on a small screen would create a small image (and in theory vice versa).
This will likely resolve (ABA-827), as inserting an image is no longer determined by viewport size, but original image size.
This also means uploading a large image makes it large (assuming AWS has no compression, i has no checked).
Before:
After: