Create a Link to Larger Image from within list of smaller images
Just use wp_get_attachment_image_src 2 times, to retrieve the 2 sizes: function display_images_in_list($size=”thumbnail”, $fullsize=”full”) { //.. previous function code is good … foreach($images as $image) { $th = wp_get_attachment_image_src($image->ID, $size); $full = wp_get_attachment_image_src($image->ID, $fullsize ); printf( ‘<a href=”https://wordpress.stackexchange.com/questions/114265/%s”><img src=”https://wordpress.stackexchange.com/questions/114265/%s” width=”%d” height=”%d” alt=”https://wordpress.stackexchange.com/questions/114265/%s” /></a>’, $full[0], $th[0], $th[1], $th[2], esc_attr( $image->post_title ) ); } } } the use … Read more