title: codeigniter thumbnail not created with this code
body: <p>I am using the following code but don't know why thumbnails are not created. </p>
  
  <pre><code>//UPLOAD IMAGE
      //some $config vars for image
      $config['upload_path'] = './images/models';
      $config['allowed_types'] = 'gif|jpg|jpeg|png|tif';
      $config['max_size'] = '0';
      $config['remove_spaces'] = true;
      $config['overwrite'] = false;
      $config['max_width'] = '0';
      $config['max_height'] = '0';
  
      $this-&gt;load-&gt;library('upload', $config);
  
      //upload main image
      if(!$this-&gt;upload-&gt;do_upload('photo')){
          $e = $this-&gt;upload-&gt;display_errors();
          print_r($e);
      }
  
      $image = $this-&gt;upload-&gt;data();
  
      //print '&lt;pre&gt;';
      //print_r($image); exit;
  
      if($image['file_name']){
          $data['photo']  = "images/models/". $image['file_name'];
          $data['raw' ]   = $image['raw_name'];
          $data['ext']    = $image['file_ext'];
      }
  
  
      //create new image
      $config0['image_library'] = 'gd2';
      $config0['source_image'] = $image['full_path'];
      $config0['new_image'] = "images/models/"."front". $image['file_name']; // you can assign your image name and location
      $config0['maintain_ratio'] = FALSE;
      $config0['width'] = 320;
      $config0['height'] = 270;
  
      $this-&gt;load-&gt;library('image_lib', $config0);
      if ( ! $this-&gt;image_lib-&gt;resize())
      {
      echo $this-&gt;image_lib-&gt;display_errors();
      }
  
      //end of new image
  
  
  
      $config3['image_library'] = 'gd2';
      $config3['source_image'] = $image['full_path'];
      $config3['new_image'] = "images/models/"."main". $image['file_name'];
      $config3['maintain_ratio'] = FALSE;
      $config3['width'] = 800;
      $config3['height'] = 600;
  
      $this-&gt;load-&gt;library('image_lib', $config3);
      $this-&gt;image_lib-&gt;initialize($config3);
      $this-&gt;image_lib-&gt;resize();
  
  
  
      $config4['image_library'] = 'gd2';
      $config4['source_image'] = $image['full_path'];
      $config4['new_image'] = "images/models/"."third". $image['file_name'];
      $config4['maintain_ratio'] = FALSE;
      $config4['width'] = 185;
      $config4['height'] = 125;
  
      $this-&gt;load-&gt;library('image_lib', $config4);
      $this-&gt;image_lib-&gt;initialize($config4);
      $this-&gt;image_lib-&gt;resize();
  
  
      //thumbnail creation start
      $config1['image_library'] = 'gd2';
      $config1['source_image'] = $image['full_path'];
      $config1['create_thumb'] = TRUE;
      $config1['maintain_ratio'] = FALSE;
      $config1['width'] = 185;
      $config1['height'] = 125;
  
      $this-&gt;load-&gt;library('image_lib', $config1);
      $this-&gt;image_lib-&gt;initialize($config1);
      if ( ! $this-&gt;image_lib-&gt;resize())
      {
      echo $this-&gt;image_lib-&gt;display_errors();
      }
  
      //THUMBNAIL ENDS
  </code></pre>