I’m trying to make thumbmails of user imaes. However, I always get ‘path to the image is incorrect.”
my code:
$settings = array(
'source_image' => '/videotuts/profilepic/userimg.png',
'create_thumb' => TRUE,
'new_image' => '/videotuts/profilepic'
);
$this->load->library('image_lib',$settings);
$r = $this->image_lib->resize();
Does it matter that codeigniter is not installed in my website root?
Looking at all the answers and comments, let me assume that you have codeigniter in folder
/htdocs/videotuts/, notice there is a/in the starting. So youindex.phpis located inhtdocs/videotuts/index.php. Codeigniter libraries will follow any path respective toindex.phpand hence there should be a path/videotuts/profilepic/userimg.pngunder/htdocs/videotuts/or the full path should be ‘/htdocs/videotuts/videotuts/profilepic/userimg.png’. If its not the same, remove the unwanted folder name from your paths. You don’t need to useAPPPATHorFCPATHorBASEPATH. 2ndly, if you are creating thumbnails, I hope you have correctly set read write perms for image folders.