wp_get_attachement_image
wants the second argument to be an array of width, height
like:
array(‘900’, ‘1200’).
So in your example if attachment id is 1096, width is 219, and height is 98, it would be:
<?php echo wp_get_attachment_image( 1096, array( 219, 98) ); ?>
If you’re looking for the un-cropped, full image:
Instead of using wp_get_attachment
, try wp_get_attachment_image_src
and pass a size argument of “full.”
This returns an array:
(false|array) Returns an array (url, width, height, is_intermediate),
or false, if no image is available.
So we get the url like so:
$attachment_id = '1906';
$image_array = wp_get_attachment_image_src( $attachment_id, 'full' );
echo '<img src="'. $image_array[0] .'" >';