PHP Class elFinderPluginAutoResize

Auto resize on file upload. ex. binding, configure on connector options $opts = array( 'bind' => array( 'upload.presave' => array( 'Plugin.AutoResize.onUpLoadPreSave' ) ), global configure (optional) 'plugin' => array( 'AutoResize' => array( 'enable' => true, // For control by volume driver 'maxWidth' => 1024, // Path to Water mark image 'maxHeight' => 1024, // Margin right pixel 'quality' => 95, // JPEG image save quality 'preserveExif' => false, // Preserve EXIF data (Imagick only) 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP // Target image formats ( bit-field ) ) ), each volume configure (optional) 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => '/path/to/files/', 'URL' => 'http://localhost/to/files/' 'plugin' => array( 'AutoResize' => array( 'enable' => true, // For control by volume driver 'maxWidth' => 1024, // Path to Water mark image 'maxHeight' => 1024, // Margin right pixel 'quality' => 95, // JPEG image save quality 'preserveExif' => false, // Preserve EXIF data (Imagick only) 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP // Target image formats ( bit-field ) ) ) ) ) );
Author: Naoki Sawada
Show file Open project: studio-42/elfinder

Public Methods

Method Description
__construct ( $opts )
onUpLoadPreSave ( &$path, &$name, $src, $elfinder, $volume )

Private Methods

Method Description
resize ( $volume, $src, $srcImgInfo, $maxWidth, $maxHeight, $jpgQuality, $preserveExif )

Method Details

__construct() public method

public __construct ( $opts )

onUpLoadPreSave() public method

public onUpLoadPreSave ( &$path, &$name, $src, $elfinder, $volume )