$img = Image::make($fullPath);
if($img->height() > $size || $img->width() > $size)
{
$img->fit($size);
$newFileName = $this->getImageName($originalFile,$size);
$img->save($this->path_images.$newFileName);
} else {
// in case of target image is small than $size parameter, no need to resize. just return the orginal path
$newFileName = $originalFile;
}