filestack/Filelink.php
public function resize($width, $height, $fit = 'clip', $align = 'center')
    {
        $options = [
            'w' => $width,
            'h' => $height,
            'f' => $fit,
            'a' => $align
        ];

        // call TransformationMixin function
        $this->setTransformUrl('resize', $options);

        return $this;
    }
public function resize($width, $height, $fit = 'clip', $align = 'center')
    {
        $options = [
            'w' => $width,
            'h' => $height,
            'f' => $fit,
            'a' => $align
        ];

        // call TransformationMixin function
        $this->setTransformUrl('resize', $options);

        return $this;
    }
public function resize ( $ width , $ height , $ fit = 'clip' , $ align = 'center' ) { $ options = [ 'w' => $ width , 'h' => $ height , 'f' => $ fit , 'a' => $ align ] ; // call TransformationMixin function $ this -> setTransformUrl ( 'resize' , $ options ) ; return $ this ; }
Set this Filelink's transform_url to include the resize task

@param int       $width      The width in pixels to resize the image to.
The range is 1 to 10000.
@param int       $height     The height in pixels to resize the image to.
The range is 1 to 10000.
@param string    $fit        clip, crop, scale, or max
'clip': Resizes the image to fit within the
specified parameters without distorting,
cropping, or changing the aspect ratio.
'crop': Resizes the image to fit the specified
parameters exactly by removing any parts of
the image that don't fit within the boundaries.
'scale': Resizes the image to fit the specified
parameters exactly by scaling the image to
the desired size. The aspect ratio of the
image is not respected and the image can
be distorted using this method.
'max': Resizes the image to fit within the
parameters, but as opposed to 'clip' will
not scale the image if the image is smaller
than the output size.
@param string    $align      Using align, you can choose the area of the image
to focus on. Possible values:
center, top, bottom, left, right, or faces
You can also specify pairs e.g. align:[top,left].
Center cannot be used in pairs.

@throws FilestackException   if API call fails, e.g 404 file not found

@return Filestack/Filelink
Set this Filelink s transform_url to include the resize task