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

        $alt= $img['alt'];
        $size = 'medium'; // (thumbnail, medium, large, full or custom size)
        $thumb = $img['sizes'][ $size ];
        if ($img): ?>
          <div class="imgContainer2">
              <img src="<?php echo $thumb; ?>" alt="<?php echo $alt ?>">
        <?php endif;

    This one is proper way to get img with sizes defined in database……..
    this code is part of ACF Pro, where i am using this img from sub filed, that can be changed to get_field