Meta-Box plugin function Wordpress does not return image with size defined

1

I installed Wordpress in the MetaBox plugin and added the Image Advanced field, in the file function.php I added the following one custom thumbnails with this configuration.

add_image_size( 'destaque-pesquisa', 120, 90, true );

On the page that I want the image to appear I entered the following code.

<?php 
$images = rwmb_meta('image_advanced_2','type=image&size=destaque-pesquisa'); ?>
<?php if (!empty( $images )){ ?>
<?php foreach ( $images as $image ){?>

<img src='<?php echo $image['url']; ?>'  alt='<?php echo $image['alt']; ?>' >
<?php }} ?>

The image appears on the bad page without the pre-defined dimension in destaque-pesquisa

In the Meta-Box plugin's documentation it says:

$images = rwmb_meta( 'gallery', 'size=YOURSIZE' );
// Ou
$images = rwmb_meta( 'gallery', 'type=image&size=YOURSIZE' );
    
asked by anonymous 03.10.2017 / 02:45

0 answers