Include custom images

If your blocks make use of images that need to be uploaded to the Media Library, you need to fill the group property custom_images with an array of those images data.
Inside the editor, the user will be prompted to upload the images clicking a button.

Images can be uploaded from your plugin folder, theme folder or an external url.
To use the image data in a block attribute value there are two ways:

Use an image property

Include a string starting with dcfb.your-image-name. followed by the property path.

block_attribute_image_id: "",
block_attribute_image_url: ""

Use one or more modified image properties

Include an object which includes the property dcfb_resolve with a value of a function that returns the desired property. The function will receive all properties from that object as function arguments.
For example the following attribute:

aspect_ratio: {
    width: "dcfb.your-image.media_details.sizes.large.width",
    height: "dcfb.your-image.media_details.sizes.large.height",
    dcfb_resolve: ({ width, height }) => { return ( width / height ); }

will resolve to the image ( width / height ) value. So if the image width was 1000 and its height 500, then the attribute would end up with the value:

aspect_ratio: 2

The image property path is taken from the JSON object returned from the media response of the WordPress REST API (to see the schema of this object, in your site check: