thank's a lot durairaj!
a combination of each code work's!
$image = \Config\Services::image();
$file = $this->request->getFile('imatge');
if($file->isValid())
{
$any=date("y"); if(strlen($any)==1){$any="0".$any;}
$mes=date("m"); if(strlen($mes)==1){$mes="0".$mes;}
$dia=date("d"); if(strlen($dia)==1){$dia="0".$dia;}
$hor=date("H"); if(strlen($hor)==1){$hor="0".$hor;}
$min=date("i"); if(strlen($min)==1){$min="0".$min;}
$seg=date("s"); if(strlen($seg)==1){$seg="0".$seg;}
$rand = rand(1000,9999);
$path = $file->getPath();
$ext = $file->getExtension();
$nom_arxiu = 'img'."_".$rand."_".$any.$mes.$dia."_".$hor.$min.$seg.".".$ext;
$PATH = getcwd();
$image->withFile($path.'/'.$file->getFileName())
->resize(600, 600)
->save($PATH .'/assets/img/equips/'. $nom_arxiu, 60);
// falta update BBDD
}
else
{
d(phpinfo());
d($file->getErrorString());
}