Creating Thumbnail In Codeigniter

[Solved] Creating Thumbnail In Codeigniter | Php Frameworks Codeigniter - Code Explorer | yomemimo.com
Question : creating thumbnail in codeigniter

Answered by : friendly-ferret-3liqcxrky19d

public function do_resize()
{ $filename = $this->input->post('new_val'); $source_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/tmp/' . $filename; $target_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/'; $config_manip = array( 'image_library' => 'gd2', 'source_image' => $source_path, 'new_image' => $target_path, 'maintain_ratio' => TRUE, 'create_thumb' => TRUE, 'thumb_marker' => '_thumb', 'width' => 150, 'height' => 150 ); $this->load->library('image_lib', $config_manip); if (!$this->image_lib->resize()) { echo $this->image_lib->display_errors(); } // clear // $this->image_lib->clear();
}

Source : https://stackoverflow.com/questions/11504350/codeigniter-resize-image-and-create-thumbnail/11505260 | Last Update : Sat, 07 Nov 20

Question : Thumbnail in Codeigniter

Answered by : md-rashaduzzaman

public function do_resize()
{ $filename = $this->input->post('new_val'); $source_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/tmp/' . $filename; $target_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/'; $config_manip = array( 'image_library' => 'gd2', 'source_image' => $source_path, 'new_image' => $target_path, 'maintain_ratio' => TRUE, 'create_thumb' => TRUE, 'thumb_marker' => '_thumb', 'width' => 150, 'height' => 150 ); $this->load->library('image_lib', $config_manip); if (!$this->image_lib->resize()) { echo $this->image_lib->display_errors(); } // clear // $this->image_lib->clear();
}

Source : https://stackoverflow.com/questions/11504350/codeigniter-resize-image-and-create-thumbnail | Last Update : Fri, 01 Jul 22

Answers related to creating thumbnail in codeigniter

Code Explorer Popular Question For Php Frameworks Codeigniter