Guttenberg Collapse-O-Matic Image Embed

This is a little test of how to embed an image in a guttenberg expand shortcode block. The issue this aims to resolved can be found here.

since there is not an easy way to ‘insert’ an image inside a shortcode, the raw html will have to be placed. First we insert an image in a normal Gutenberg block:

Then we need to grab the html for that image by editing the block as html. The source for the above image is:

<img src="https://spacedonkey.de/wp-content/uploads/2015/06/The-Big-Lebowski-the-big-lebowski-31504499-540-720.jpg" alt="" class="wp-image-2398"/>

So we paste that in the shortcode block… so all togher it looks like:

[expand title="click to view image"] <img src="https://spacedonkey.de/wp-content/uploads/2015/06/The-Big-Lebowski-the-big-lebowski-31504499-540-720.jpg" alt="" class="wp-image-2398"/> [/expand]

And here is an example of the whole shebang in action:

click to view image