-
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
Automatic downsizing of larger-than-necessary images #32
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ababic
force-pushed
the
feature/resize-downloaded-images
branch
2 times, most recently
from
July 3, 2024 13:03
618b814
to
ce0701d
Compare
ababic
commented
Jul 3, 2024
ababic
force-pushed
the
feature/resize-downloaded-images
branch
12 times, most recently
from
July 4, 2024 19:50
4ed67fb
to
bf90110
Compare
ababic
force-pushed
the
feature/resize-downloaded-images
branch
4 times, most recently
from
July 5, 2024 12:21
c0a2448
to
0e04177
Compare
ababic
force-pushed
the
feature/resize-downloaded-images
branch
from
July 10, 2024 14:48
0e04177
to
c1fcee7
Compare
ababic
force-pushed
the
feature/resize-downloaded-images
branch
4 times, most recently
from
July 29, 2024 15:55
56db87d
to
f737355
Compare
ababic
force-pushed
the
feature/resize-downloaded-images
branch
from
July 29, 2024 16:02
f737355
to
43007aa
Compare
ababic
force-pushed
the
feature/resize-downloaded-images
branch
from
July 29, 2024 16:22
c5907bd
to
b1d2bd6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: Includes changes from #31, which should be reviewed/merged first
Contrary to what you might think from reviewing the documentation on the subject, setting up custom derivatives that appear in API responses alongside the default
mini
,thul
andwebimage
values is quite limited, and my client couldn't find a way to reliably restrict the dimensions forWagtailSource
as we had agreed.Since Wagtail has everything we need to manipulate images on-the-fly, I thought a sensible way to avoid unreasonably large images from making it into a library (a leading cause of memory usage issues on Wagtail sites) would be to introduce the
BYNDER_SOURCE_IMAGE_MAX_WIDTH
andBYNDER_SOURCE_IMAGE_MAX_HEIGHT
settings, and use them to check and downsize downloaded images before using them to set the source file.