Create a Thumbnail of original image.
App::Utility()->createThumb(Src,Des,MaxHeight, MaxWidth)
Parameter |
Description |
---|---|
Src |
Source file |
Des |
Destination path of the thumbnail |
MaxWidth |
Width oft the thumbnail |
MaxHeight |
Height of the thumbnail |
Note: Width and Height vary to adjust the ratio.
See bellow example:
$src = App::Config()->baseDir("/uploads/Winter.jpg");
$dsc = App::Config()->baseDir("/uploads/thumb.jpg");
if(file_exists($src)){
App::Utility()->createThumb($src ,$dsc,100,100);
}