ok it seems the proper way to do this is:
$product = new Product($id, false, $lang); $img = $product->getCover($id); $url = Context::getContext()->link->getImageLink(isset($product->link_rewrite) ? $product->link_rewrite : $product->name, (int) $img['id_image'], 'small_default');