• Hi

    I can’t work out how to display the correct image size using wp_get_attachment_image_src. I’ve added the image size to functions.php and it is called ‘side’.

    <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($item->ID), false, 'side' ); ?>
    
    <img class="img-responsive" src="<?php echo $src[0]; ?>">

    To me this looks like it should logically work, but I’m obviously missing something. It echos out the full size image.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_get_attachment_image_src image size’ is closed to new replies.