Created
November 14, 2013 20:28
-
-
Save lrdiv/7473785 to your computer and use it in GitHub Desktop.
Pull specific image size from custom field by image ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$attachment_id = the_field('the_image'); | |
$size = 'small'; | |
$image = wp_get_attachment_image_src($attachment_id, $size); | |
?> | |
<img src="<?php echo $image[0]; ?>" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment