How to modify an image block in Gutenberg WordPress 5?
After some digging and trial/error I have came up with a couple solutions. I was looking for a “Gutenberg” solution so I could avoid using str_replace. First, we need to enqueue our JS and include the wp.blocks package // Add to functions.php function gutenberg_enqueue() { wp_enqueue_script( ‘myguten-script’, // get_template_directory_uri() . ‘/js/gutenberg.js’, // For Parent Themes … Read more