WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.48k stars 4.18k forks source link

Add attribution to image block #37468

Open simison opened 2 years ago

simison commented 2 years ago

What problem does this address?

In State Of The Word 2022 we saw Openverse introduced, and how attribution was copied from Openverse to the editor (video at 7min):

Screenshot 2021-12-16 at 23 38 17

In the example, they used paragraph blocks.

Plugins extending WordPress might pull from other image sources as well, and place attribution in caption field:

Screenshot 2021-12-16 at 23 36 03

What is your proposed solution?

It could be useful to have "attribution" or a similar field in image block attributes.

Theme or site could style the attribution differently from the caption; often it's just after the caption text, but in a slightly smaller or thinner style. Other times it's over the image in a much smaller copy while the caption is under the image.

Attribution text is also useful when added to image tag e.g. via schema attributes like license, creditText, or creator.

Adding this to image block would propagate the feature to other blocks such as Gallery.

Some examples from various news sites:

Screenshot 2021-12-17 at 00 04 06 Screenshot 2021-12-17 at 00 03 03 Screenshot 2021-12-17 at 00 01 36 Screenshot 2021-12-16 at 23 59 38 Screenshot 2021-12-17 at 00 14 55 Screenshot 2021-12-17 at 00 28 20 Screenshot 2021-12-17 at 01 02 50

There could be some other uses in different layout situations, for example New York Times:

image
Mamaduka commented 2 years ago

I think this might be easier if we start using inner blocks for citation, and then we can have separate inner blocks for attributions—related PR #31823.