I read documents and try to do my best to make thumbs up from uploaded images, but I can not find the problem.
Images are loaded and saved correctly, but there are no thumbs, it does not work without error output. This is Im code using:
$data = $this->upload->data();
$config_image['image_library'] = 'gd';
$config_image['source_image'] = $data['full_path'];
$config_image['new_image'] = 'uploads/thumbs/';
$config_image['create_thumb'] = TRUE;
$config_image['maintain_ratio'] = TRUE;
$config_image['width'] = 750;
$this->load->library('image_lib', $config_image);
if ( !$this->image_lib->resize())
{
$this->session->set_flashdata('message', $this->image_lib->display_errors());
}
In addition, I want to resize the images to fit max-width = 750, but keep the ratio. Is Im Right To Achieve This? Thank!
Nacho source
share