Gutenberg: Enhancement: Image to be retained on changing back to "Cover image" block from "Image" block

Created on 18 Oct 2018  路  2Comments  路  Source: WordPress/gutenberg

Behaviour when changing the block from Cover image -> Heading -> Cover image

  • When I add a cover image with a text on it, change this block type to Heading and change it back to Cover image block type, the image is seen to have disappeared.

screenshot 2018-10-18 at 21 47 53
Image showing a Cover image block with an image and text on it

screenshot 2018-10-18 at 21 49 10
On changing the block back to Cover image type, the image and the text are seen to be lost

Behaviour when changing the block from Cover image -> Image -> Cover image

The situation explained earlier is not the same case when I change the Cover image block to Image block first, and then change it back to Cover image. It can be noticed that the text on this block is retained as well, as a caption! I think this would be the behaviour users would hope to see on the previous point as well.

screenshot 2018-10-18 at 21 48 20
The image exists as an Image block with the previous text as a caption

Describe the solution you'd like

When I change the Image block (which was previously a Cover image block) back to Cover image block, the image is to be retained.

[Feature] Blocks [Type] Bug

All 2 comments

The current behaviour seems to make sense to me. Block conversions are generally one way and data can be lost along the way. There is no image associated with a heading, so when you convert a cover image to a heading the image information will be lost. Converting a cover image to an image retains the image data.

Yes, this is expected behaviour. There might be improvement to make, but would need to be handled on a case by case basis.

Was this page helpful?
0 / 5 - 0 ratings