PHP Trait Webiny\Component\Image\ImageTrait

Show file Open project: Webiny/Framework

Public Methods

Method Description
image ( string | File $image, string | Storage $storage = 'local' ) : Webiny\Component\Image\ImageInterface Loads the image and returns an instance of Image class.

Method Details

image() public method

Loads the image and returns an instance of Image class.
public image ( string | File $image, string | Storage $storage = 'local' ) : Webiny\Component\Image\ImageInterface
$image string | Webiny\Component\Storage\File\File This can either be image file name that corresponds to File $key parameter, or it can be an instance of Webiny\Component\Storage\File\File.
$storage string | Webiny\Component\Storage\Storage This can either be the name of the storage service or it can be an instance of Webiny\Component\Storage\Storage. NOTE: This parameter is not required if you pass the $image as instance of Webiny\Component\Storage\File\File.
return Webiny\Component\Image\ImageInterface