Not right now, but it’s definitely a future feature that we’re tracking. You can follow along here: https://github.com/getblocklab/block-lab/issues/256
This will get the attachment Id from the full image URL. Then you could use the attachment Id to get any image size you want. I agree that Block Lab should make this easier though by being able to return a URL, Id or object.
https://pippinsplugins.com/retrieve-attachment-id-from-image-url/
-
This reply was modified 7 years, 2 months ago by
takeok.
-
This reply was modified 7 years, 2 months ago by
takeok.
thats great, thanks TakeoK!
You can take advantage of the block_value function since it’s returning the id of the image:
$image_thumb = wp_get_attachment_image_src(block_value('image'), 'thumbnail');
and then access the image with $image_thumb[0];.