Image::make
Create a new image resource
2.9M Downloads / Month
Open Source MIT License
2.9M Downloads / Month
Open Source MIT License
public static Intervention\Image\ImageManager make(mixed $source)
Universal factory method to create a new image instance from source. The method is highly variable to read all the input types listed below.
Source to create an image from. The method responds to the following input types:
allow_url_fopen
must be enabled).Intervention\Image\Image
instanceSymfony\Component\HttpFoundation\File\UploadedFile
)Instance of Intervention\Image\Image
// create a new image resource from file
$img = Image::make('public/foo.jpg');
// or create a new image resource from binary data
$img = Image::make(file_get_contents('public/foo.jpg'));
// create a new image from gd resource
$img = Image::make(imagecreatefromjpeg('public/foo.jpg'));
// create a new image directly from an url
$img = Image::make('http://example.com/example.jpg');
// create a new image directly from Laravel file upload
$img = Image::make(Request::file('photo'));