Merhaba, aşağıdaki koda göre resim upload ederken aynı zamanda image_lib ile thumbnail nasıl ekleyebilirim.

$this->load->library("upload");

		if ($this->settings->info->photo_upload) {
			if ($_FILES['userfile']['size'] > 0) {
				$this->upload->initialize(array( 
			       "upload_path" => $this->settings->info->upload_path,
			       "overwrite" => FALSE,
			       "max_filename" => 500,
			       "encrypt_name" => TRUE,
			       "remove_spaces" => TRUE,
			       "allowed_types" => $this->settings->info->file_types,
			       "max_size" => $this->settings->info->file_size,
			       "xss_clean" => TRUE,
			       "max_width" => 500,
			       "max_height" => 500
			    ));

			    if (!$this->upload->do_upload()) {
			    	$this->template->error(lang("error_21")
			    	.$this->upload->display_errors());
			    }

			    $data = $this->upload->data();

			    $image = $data['file_name'];
			} else {
				$image= $this->user->info->photo;
			}
		} else {
			$image= $this->user->info->photo;
		}