Support

Account

Home Forums General Issues Custom Image Sizes Reply To: Custom Image Sizes

  • I followed instructions from Jonathan above but the code posted by Jonathan doesn’t work.
    I set the image to Object in repeater field, this is my code:

    $image_1 = get_sub_field('location_image');
    
    <?php if($image_1): ?>
                    <img src="<?php echo $image_1['sizes']['medium']; ?>" style="max-width:300px;" alt="" />
                    <?php endif; ?>

    when I remove
    ['sizes']['medium']
    it works fine.

    What’s the problem? Should there somewhere be [‘url’] added?