public function resize($filename, $width, $height)
    {
        // open an image file
        $img = Image::make($this->pathOfImagesUploadFolder() .'/'. $filename);

        // resize image
        // http://image.intervention.io/api/resize
        // closure prevents possible upsizing
        $img->resize($width, $height, function ($constraint) {
            $constraint->aspectRatio();
            $constraint->upsize();
        });

        $img->save($this->pathFilenameOfResizedImage($filename, $width, $height));
    }
public function resize($filename, $width, $height)
    {
        // open an image file
        $img = Image::make($this->pathOfImagesUploadFolder() .'/'. $filename);

        // resize image
        // http://image.intervention.io/api/resize
        // closure prevents possible upsizing
        $img->resize($width, $height, function ($constraint) {
            $constraint->aspectRatio();
            $constraint->upsize();
        });

        $img->save($this->pathFilenameOfResizedImage($filename, $width, $height));
    }
public function resize ( $ filename , $ width , $ height ) { // open an image file $ img = Image :: make ( $ this -> pathOfImagesUploadFolder ( ) . '/' . $ filename ) ; // resize image // http://image.intervention.io/api/resize // closure prevents possible upsizing $ img -> resize ( $ width , $ height , function ( $ constraint ) { $ constraint -> aspectRatio ( ) ; $ constraint -> upsize ( ) ; } ) ; $ img -> save ( $ this -> pathFilenameOfResizedImage ( $ filename , $ width , $ height ) ) ; }
Resize the image using the terrific Intervention package

@param   string  $filename      Image filename
@param   int     $width         Resized width
@param   int     $height        Resized height
@return  void
Resize the image using the terrific Intervention package