You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$image_id = block_value( 'image' ); // This will return the image's ID.$image_url = wp_get_attachment_image( $image_id, 'thumbnail' );
Using wp_get_attachment_image is a really handy way of getting the best image size for the job. You can even pass an array of width and height to get the most optimal image:
Q. What prefix does Block Lab use for custom blocks? WordPress uses core for the blocks that come standard with WordPress (e.g. core/paragraph, core/image), so what does Block Lab use?
A. Custom blocks built with Block Lab are prefixed with block-lab. For example, if you created a custom block with the name feature, it would be registered as block-lab/feature.