I am having a problem while creating image thumbnails in codeigniter. The problem is images are not stored on the same server. It's stored in amazon server and the url is stored in our server. So while processing to get the image thumb from the url it does not show any error, and it's not creating a thumbnail too. I don't know what is wrong with my code. Below is my code for the initialization of the image library. I am passing the image url to the below block of code dynamically.
$config['image_library'] = 'gd2';
$config['source_image'] = $imgUrl;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 75;
$config['height'] = 50;
$config['new_image'] = FCPATH."assets/img/";
$config['thumb_marker'] = '_thumb';
$this->load->library('image_lib', $config);
$this->image_lib->resize();
echo "<pre>";
print_r($config);
echo "</pre>";
Below is one sample response from that print.
Array
(
[image_library] => gd2
[source_image] => https://ls-test-bucket.s3.amazonaws.com/Uploadedimage/14405666901132976211195505780617677415047103069725429n.jpg
[create_thumb] => 1
[maintain_ratio] => 1
[width] => 75
[height] => 50
[new_image] => D:\zend\Apache2\htdocs\CodeIgniter3_1/assets/img/
[thumb_marker] => _thumb
)
So how can I create a thumbnail from the url in codeigniter? Note: I already have write access to the new image folder.