Meta Box
Support Forum
Support › General › Change single image sizeResolved
How do I add width and height to this bit of code:
<?php $image = rwmb_meta( 'state_featured_image', ['object_type' => 'term'], $state->term_id ); echo '<img src='. $image['url'] .' />'; ?>
Hi Rebecca,
You can add the size setting to the second parameter of the helper shortcode.
size
$image = rwmb_meta( 'state_featured_image', ['object_type' => 'term', 'size' => 'large'], $state->term_id );
Please read more here https://docs.metabox.io/fields/single-image/#template-usage
Thank you!
The documentation wasn't helping much, I tried putting the size everywhere I could think of. I finally ended up using the code from the adding images to categories.