import image in prestashop with a file directory

I would like to import an image from my pc, the problem is that I don’t know how to do it, I looked on a lot of forums, no answer, my current code allows to import an image but from a url
If someone would have an idea or documentation I’m interested

My code :

$image = new Image();
$image->id_product = $product->id;
$image->position = Image::getHighestPosition($product->id) + 1;
$image->cover = true;
$image->image_format = 'jpg';
$image->save();
$this->copyImg((int)$product->id, (int)$image->id, $xml->urlImage, 'products', false);

Thanks