$image_data = $this->upload->data();
$configer = array(
'image_library' => 'gd2',
'source_image' => $image_data['full_path'],
'maintain_ratio' => TRUE,
'width' => 50,
'height' => 50,
);
$this->load->library('image_lib', $config);
$this->image_lib->clear();
$this->image_lib->initialize($configer);
if( $this->image_lib->resize()){
echo "Image Resize and Upload Successfully";
}
## USING CORE
https://makitweb.com/how-to-compress-image-size-while-uploading-with-php/
$configer = array(
'image_library' => 'gd2',
'source_image' => $image_data['full_path'],
'maintain_ratio' => TRUE,
'width' => 50,
'height' => 50,
);
$this->load->library('image_lib', $config);
$this->image_lib->clear();
$this->image_lib->initialize($configer);
if( $this->image_lib->resize()){
echo "Image Resize and Upload Successfully";
}
## USING CORE
https://makitweb.com/how-to-compress-image-size-while-uploading-with-php/
Comments
Post a Comment