Welcome Guest, Not a member yet? Register   Sign In
Resize after upload

Good day, am trying to resize on upload, seems not to be working out. it shows this error "imagecopyresampled(): supplied resource is not a valid Image resource" after resizing to just one folder.
PHP Code:
if ($imagefile $this->request->getFile('avatar'))
      if ($imagefile->isValid() && ! $imagefile->hasMoved())
$path FCPATH.'profile/';
            $filename $imagefile->getRandomName();
            $file_full_path $path $filename;
  $sizes = array('600','920','200');
           foreach ($sizes as $size)
  $resizepath $imagefile->setPath($path.$size.'/');
$result['status'] = 200;
                $result['image'] = $path.'200/'.$filename;


Theme © iAndrew 2016 - Forum software by © MyBB