Hi all, I’ve been reading the docs and trying everything to make thumbs out of uploaded images but I can’t seem to find the problem.
Images are uploaded and saved correctly but thumbs are not, it fails with no error output. This is the code I’m 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());
}
Also, I want to resize images to fit max-width=750, but maintain the ratio. Is what I’m doing correct to achieve that? Thanks!