Create thumbnail image from PHP

// Below example creates a thumbnail and returns <img/> tag:
$fImgConf = array(
		'file' => $imgPath,
		'file.' => array('maxW' => $width,'maxH' => $height),
		'titleText' => $cat2['categories_name'],
		'altText' => $cat2['categories_name']
);
$image = $this->cObj->IMAGE($fImgConf);

// Below example returns only the URL of the thumbnail (so you can define your own HTML markup):
$imageSizeSettings = array(
		'height' => '599c',
		'minW' => '1040',
		'minH' => '599',
		'maxW' => $width,
		'maxH' => $height
);
$webPathArray = $this->cObj->getImgResource($webPath,$imageSizeSettings);
$webPath=$webPathArray[3];
Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp