src/Service.php
public function getImageToSize(EmbeddedAsset $embeddedAsset, int $size)
	{
		return is_array($embeddedAsset->images) ?
			$this->_getImageToSize($embeddedAsset->images, $size) : null;
	}
public function getImageToSize(EmbeddedAsset $embeddedAsset, int $size)
	{
		return is_array($embeddedAsset->images) ?
			$this->_getImageToSize($embeddedAsset->images, $size) : null;
	}
public function getImageToSize ( EmbeddedAsset $ embeddedAsset , int $ size ) { return is_array ( $ embeddedAsset -> images ) ? $ this -> _getImageToSize ( $ embeddedAsset -> images , $ size ) : null ; }
Returns the image from an embedded asset closest to some size.
It favours images that most minimally exceed the supplied size.

@param EmbeddedAsset $embeddedAsset
@param int $size
@return array|null
Returns the image from an embedded asset closest to some size . It favours images that most minimally exceed the supplied size .