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
Gallery block: Fix bug with initial image size #41079
Conversation
Size Change: +8 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
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.
This tests well for me! Good catch.
I tested using the same image.
On trunk, here's the default code after insertion. It appears as "Large" in the dropdown, but the link is to the full-sized image:
On this branch, here's the default code after insertion. It appears as "Large" in the dropdown, and the link is to the smaller, "large" image:
What?
The default image size slug for a new gallery is
large
so this PR ensures that the correct corresponding image url is used for this slugWhy?
Currently all new images selected from the media browser default to the full image url instead of the large one.
Fixes: #41072
How?
Passes the full imageData object to the
pickRelevantMediaFiles
method so the correct image size url can be located.Testing Instructions
Screenshots or screencast
Before:
gallery-imagesize-before.mp4
After:
gallery-imagesize-after.mp4