public function getThumbnail(int $size = 210, bool $ssl = false)
    {
        $thumbs = [];
        foreach ($this->safeGet('thumbnail') as $thumb) {
            $thumbs[$thumb['width']] = $thumb['_link'];
        }

        $sizes = array_keys($thumbs);
        while (true) {
            $thumbSize = array_shift($sizes);
            if ((int) $size <= (int) $thumbSize || count($sizes) === 0) {
                return $thumbs[$thumbSize];
            }
        }
    }
public function getThumbnail(int $size = 210, bool $ssl = false)
    {
        $thumbs = [];
        foreach ($this->safeGet('thumbnail') as $thumb) {
            $thumbs[$thumb['width']] = $thumb['_link'];
        }

        $sizes = array_keys($thumbs);
        while (true) {
            $thumbSize = array_shift($sizes);
            if ((int) $size <= (int) $thumbSize || count($sizes) === 0) {
                return $thumbs[$thumbSize];
            }
        }
    }
public function getThumbnail ( int $ size = 210 , bool $ ssl = false ) { $ thumbs = [ ] ; foreach ( $ this -> safeGet ( 'thumbnail' ) as $ thumb ) { $ thumbs [ $ thumb [ 'width' ] ] = $ thumb [ '_link' ] ; } $ sizes = array_keys ( $ thumbs ) ; while ( true ) { $ thumbSize = array_shift ( $ sizes ) ; if ( ( int ) $ size <= ( int ) $ thumbSize || count ( $ sizes ) === 0 ) { return $ thumbs [ $ thumbSize ] ; } } }
Returns closes thumbnail size to input, default 210px.

@param int  $size appromimate size
@param bool $ssl  Whether or not to return https:// url for thumbnail

@return string url for thumbnail
Returns closes thumbnail size to input default 210px .