title: CodeIgniter: Making thumbs
body: <p>I have a problem making thumbs after an image upload. I can upload images perfectly but it doesn't make thumbs for me. I have a map uploads where the original images are stored and a map thumbs in uploads. It's probably a path issue i guess. Thanks</p>
  
  <p>This is my code in my controller.</p>
  
  <pre><code>    $config['upload_path'] = './uploads/';
      $config['allowed_types'] = 'gif|jpg|png';
      $config['max_size'] = '6000';
      $config['max_width']  = '3024';
      $config['max_height']  = '3768';
      $this-&gt;load-&gt;library('upload', $config);    
      if ( ! $this-&gt;upload-&gt;do_upload())
      {
          $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
      }   
      $datap = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
  
      $gallery_path = realpath(APPPATH . '../uploads');
      $upload_data = $this-&gt;upload-&gt;data();
  
      $config['image_library'] = 'gd2';
      $config['source_image'] = $upload_data['full_path'];
      $config['new_image'] = $gallery_path . '/thumbs';
      $config['create_thumb'] = TRUE;
      $config['maintain_ratio'] = TRUE;
      $config['width'] = 75;
      $config['height'] = 50;
  
      $this-&gt;load-&gt;library('image_lib', $config);
      $this-&gt;image_lib-&gt;resize();
  </code></pre>