-
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
Optimise images when they are uploaded and save in webp format #177
Conversation
lkeegan
commented
Nov 19, 2024
- backend
- open uploaded images using pillow
- resize if width > 1024
- export to webp format using pywebp
- add some png & jpeg files to the tests
- frontend-admin
- allow png uploads as well as jpg
- frontend
- update image urls
- resolves Optimize image sizes #166
- backend - open uploaded images using pillow - resize if width > 1024 - export to webp format using pywebp - add some png & jpeg files to the tests - frontend-admin - allow png uploads as well as jpg - frontend - update image urls - resolves #166
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 30.00% 30.09% +0.08%
==========================================
Files 98 98
Lines 3236 3240 +4
Branches 86 86
==========================================
+ Hits 971 975 +4
Misses 2194 2194
Partials 71 71 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Nice improvement. Code looks good, but it seems it breaks the childrengallery:
- when I add an image for a child, it cannot be retrieved:
Error in server request
Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
should we remove the image display for children altogether first? From the discussion about the default image I gathered that this is not desired anymore? Or did that just apply to the default image?
- automatically inferred type caused `Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.` runtime error in frontend
Quality Gate passedIssues Measures |
good catch - should be fixed by 8e56030
I understood that it only applied to the default image, which was not wanted, but we should still show an image if the user provides one. |