Created
May 23, 2016 07:51
-
-
Save ville6000/666bf72a12bdf80400e64020c43b1490 to your computer and use it in GitHub Desktop.
Get thumbnail with attachment ID
This file contains hidden or 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 | |
$image_id = get_attachment_id_from_url( $image_url ); | |
$thumb = wp_get_attachment_image_src( $image_id, 'thumbnail' ); | |
echo $thumb[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment