Home Forums Front-end Issues Outputting custom image size Reply To: Outputting custom image size

  • Pirondini

    Thanks for the help! Your time is much appreciated.
    I’m still getting nothing returned in the src=”” field of the image.

    I have the image field in question set up as a set up as a repeater field. It’s a child of the main group called ‘activity_slider’ with the image field called ‘photo’. So,
    My code reads like this:

    $attachment_id = get_sub_field('photo');
    // the name of the sub field. Also tried without 'sub'.
    $custom_thumb = wp_get_attachment_image_src( $attachment_id,"slide-thumb" );
    // this is the name of the thumbnail size in functions.php
    <img src="<?php echo $custom_feature[0]; ?>" />

    Nothing is returned. Tried using $custom_thumb too, but no avail.
    This is what you said to do right?

    Thanks again. Martin.