public static function image($itemId, $size)
    {
        if(has_post_thumbnail($itemId))
        {
            return wp_get_attachment_image_src(
                get_post_thumbnail_id($itemId), $size
            )[0];
        }

        return false;
    }
public static function image($itemId, $size)
    {
        if(has_post_thumbnail($itemId))
        {
            return wp_get_attachment_image_src(
                get_post_thumbnail_id($itemId), $size
            )[0];
        }

        return false;
    }
public static function image ( $ itemId , $ size ) { if ( has_post_thumbnail ( $ itemId ) ) { return wp_get_attachment_image_src ( get_post_thumbnail_id ( $ itemId ) , $ size ) [ 0 ] ; } return false ; }
Grab the URL for the featured image in a specific size.

@param integer $itemId The item (post) ID
@param string $size The image size you need
@return string|boolean The image's url OR false
Grab the URL for the featured image in a specific size .