gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Overview: Inline image improvements

Open paaljoachim opened this issue 4 years ago • 7 comments

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.

Screen Shot 2021-02-07 at 14 23 58

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

paaljoachim avatar Feb 07 '21 13:02 paaljoachim

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.

mtias avatar Feb 23 '21 12:02 mtias

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.

paaljoachim avatar Feb 23 '21 14:02 paaljoachim

Yes, the width in particular is quite confusing.

mtias avatar Feb 23 '21 14:02 mtias

An additional item for your inline image megathread: #48150

XVII avatar Feb 17 '23 01:02 XVII

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.

westonruter avatar Sep 14 '23 22:09 westonruter

#63323: "No ability to edit inline image alt text in context"

mrwweb avatar Jul 09 '24 20:07 mrwweb

There is a lot to this issue so I think for now until we have an exact path forward moving to feedback for design makes sense. We can iterate from there.

karmatosed avatar Jun 18 '25 15:06 karmatosed