Support

Account

Home Forums General Issues Image size: attachment display settings Reply To: Image size: attachment display settings

  • Hi @dadra

    You could create a select field and populate the choices with ‘thumbnail, medium, large, full, custom-size, etc’.

    Then in your code, you can load in the image like so:

    
    <?php
    
    $image = get_field('image');
    $size = get_field('size');
    
    echo $image['sizes'][ $size ];
    ?>
    

    The above example expects your image field to return an array of data, but you could change this to ID and modify the code as per the docs.

    Thanks
    E