title: Codeigniter how to upload the resize image or thumb ONLY
body: <p>I am new with <code>CodeIgniter</code> and want to resize the image first before saving to my database and local storage using <code>move_uploaded_file</code> i was able to resize using below code but how to I access the resized image and upload it using <code>move_uploaded_file</code> on PHP</p>
  
  <pre><code>$uploaddir = './images/post/';
  $uploadfile = $uploaddir . basename($value1."-".$date."-".$_FILES['file']['name']);
  
  $config['image_library'] = 'gd2';
  $config['source_image'] = $uploadfile;
  $config['create_thumb'] = TRUE;
  $config['width']     = 350;
  $config['height']   = 1;
  $config['maintain_ratio'] = TRUE;
  $config['master_dim'] = 'width';
  
  $this-&gt;image_lib-&gt;clear();
  $this-&gt;image_lib-&gt;initialize($config);
  $this-&gt;image_lib-&gt;resize();
  </code></pre>
  
  <p>Any suggestion would be great.</p>