One of my Wordpress sites has a custom field for media which contains the credit for the media item. (Something like "Photo by John Doe".)
Before Gutenberg, I overwrote the default shortcode which displayed the image, to include the credit when displaying the image in the frontend. But, with Gutenberg blocks, this no longer works.
I could create a custom block from scratch which essentially would duplicate the image block, adding the credit, but this would mean a lot of unnecessary, duplicate, work.
Preferably, I somehow adjust the default's block behaviour to add some HTML to the output of the block (which will include the credit) and to insert the credit into the block.
Is this possible? How? Where do I find a resource on how to extend existing blocks?
Alternatively, from where can I copy the code of the existing image block to create my own block, based on this existing block?