Patrick Reck
Patrick Reck

Reputation: 11374

CodeIgniter not saving image

I am trying to fetch a picture of a bear from the URL and save it as aabear.jpg. However, my code is failing. What is wrong?

$config['image_library'] = 'gd2';
$config['source_image'] = 'http://thejuxtapositionape.blog.com/files/2012/03/polar-bear-pup.jpg';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width']     = 75;
$config['height']   = 50;
$config['new_image'] = 'aabear.jpg';

$this->load->library('image_lib', $config); 

Upvotes: 0

Views: 41

Answers (1)

Patrick Reck
Patrick Reck

Reputation: 11374

Seems like the image library only takes local files as inputs.

Using polar-bear-pup.jpg worked out

Upvotes: 1

Related Questions