Open paaljoachim opened 3 years ago
It's not possible to use child blocks for inline images. Blocks are block elements, not inline formatting. Improvements to inline images UI should be proposed separately and need custom UI.
I can edit this issue to become an inline image tracking issue instead. Then I will look at creating a custom UI issue for the inline images.
Yes, the width in particular is quite confusing.
An additional item for your inline image megathread: #48150
Another inline image issue, this time from Trac: Core-59352 "Inline images inserted in the block editor can erroneously get fetchpriority=high". Also mentioned there is the incorrect width
and height
are added by wp_img_tag_add_width_and_height_attr()
, resulting in wp_img_tag_add_srcset_and_sizes_attr()
adding the wrong sizes
which finally results in an oversized image being served.
What problem does this address?
EDITING this issue to focus on various Inline image issues.
It is very limited in how we can control the Inline Image. Here is an example of what it currently looks like.
What is your proposed solution?
As @melchoyce mentioned in this comment: https://github.com/WordPress/gutenberg/issues/19426#issuecomment-771757981 "It might make more sense to refactor inline images to be child blocks, so they can have their own toolbar for settings. That would help eliminate this one-off UI and make the block's behavior more consistent." Based on Mathias comment below. We need to instead create a custom UI for the inline image feature.
Overview of Inline Image issues:
An example would be to control the height as mentioned in this issue. https://github.com/WordPress/gutenberg/issues/18035
Improve inline image sizing https://github.com/WordPress/gutenberg/issues/19426
Inline Images: Can't replace image https://github.com/WordPress/gutenberg/issues/25909
Inline images shows as Unattached in the media library https://github.com/WordPress/gutenberg/issues/17658
Inline linked image: inline popovers overlap and can hardly be used https://github.com/WordPress/gutenberg/issues/15761
Inline Images no longer show handles when selected https://github.com/WordPress/gutenberg/issues/15083
Inline images can't be resized using only the keyboard https://github.com/WordPress/gutenberg/issues/10595
How to create a custom inline-block? https://github.com/WordPress/gutenberg/issues/10235
It was brought up during a design triage on Slack: https://wordpress.slack.com/archives/C02S78ZAL/p1612282641102200