-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Bug: Image block selecting medium or thumbnail does not relocate caption - caption centered in relation to boundry box. #17162
Comments
@paaljoachim Just checked and it seems to be theme-specific. For instance, if you are using TwentyTwenty theme with the default caption aligned to the left, you won't have this issue. Perhaps the solution is to define caption alignment on I'm not really sure what's the best solution but I'm working on Caption Alignment for EditorsKit - https://wordpress.org/plugins/block-options/ and I'm sure it'll help for user-specific solution. Here's what I have for alignment toolbar so far : |
That is good to hear Jeffrey! That means we can close this issue. Do you agree? I tested using Twenty Nineteen and that has the error still there. I believe this is something @kjellr will need to adjust later on. |
I can reproduce this issue on any small image, without resizing. It would be good to fix this issue in the editor rather than forcing themes to adopt specific styling as a workaround. Some context here which should be taken into account. |
@tellthemachines As this is also affecting the new default theme Twenty Twenty One. The caption is aligned to the bounding/border box surrounding the image. It needs to be aligned directly to the image. |
@paaljoachim unfortunately this is not a 5.6 regression, so it doesn't qualify for inclusion during RC stage. Agree we should fix it soon and make sure it's ready for 5.7. |
Hi Isabel @tellthemachines |
@noisysocks Robert. I look forward to being able to center captions below the image. Today too many captions are off centered. |
Thanks for flagging. |
This issue seems like a duplicate of #11719 |
@paaljoachim these issues don't require reworking the image block! |
Can we keep the image centered within the boundary box, so that the caption is always centered below the image? |
It would be nice to get this fix into WP 5.9. We are getting additional reports on this. Additional associated/duplicate issues: Images are centered in editor and aligned left in preview I made a quick fix through the CSS to one of my customer sites. Which shows the caption centered below the image independent of the size on the frontend. Backend still shows the caption centered to the boundry box. wp-block-image { This seems like one solution. (PR has stalled) |
There seems bigger fixes needed related to the PR which was suggested by @jasmussen Can we create a step between? With focus on improving the current caption alignment problem. A fix that can also later be incorporated into the PR by @ellatrix |
Is it possible the solution for this could be making the caption respect the alignment of the image? For instance, the image currently initializes left aligned. The caption initializes centered. Is there a reason they aren't the same alignment? It would greatly improve the experience if I added an image block with everything matching the default alignment. More often than not when I add an image block, the first thing I do is click center so it matches the alignment of the caption. That seems to be the core problem. Folks want to unify that button with the content of the image block which currently has alignment settings. |
Potential fix for this at #35787 |
A big thank you to @glendaviesnz and @andrewserong ! |
Describe the bug
Resizing image by selecting image size drop down does not relocate caption when selecting thumbnail or medium.
Btw I also tested the 25%, 50% etc and these worked nicely. Except when it resets back to medium or thumbnail default image size.
To reproduce
Steps to reproduce the behavior:
Expected behavior
That the caption would show directly under the image also on thumbnail and medium size image.
Chrome.
Using Desktop Server.
Mac OS 10.13.6
The text was updated successfully, but these errors were encountered: