Modify src attribute on image block

You want to take a look at the Codex about Block Filters. You’ll need to make a filter using add_filter and hook into render_callback by re-registering core/image and modifying the render callback. Checkout this WPSE post from uruk.

WP REST API GET Method Works But Not The POST Method

Your apiFetch() usage is correct, but you’re getting the “No route was found” error because of the ‘method’ => ‘POST’ part which should actually use methods and not method. (Note that an endpoint can allow one or more HTTP methods) So when it’s method, it’s not used and thus the HTTP method defaults to GET … Read more