-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Exception
Error: Error getting remote image http://127.0.0.1:8000/storage/product_images/dfZoriBLsS8uLMbv6sDDZj5R9maHXo7e2YRWap8z.png. Error: A valid URL was not provided. [woocommerce_product_image_upload_error]
http://127.0.0.1:8000/admin/store/new/product
below is my code
foreach ($imagePaths as $imagePath) {
$fullPath = public_path($imagePath);
if (file_exists($fullPath)) {
echo "Image exists: $fullPath\n";
} else {
echo "Image does not exist: $fullPath\n";
}
$absoluteUrl = asset('storage/' . $imagePath);
$absoluteUrl = str_replace('/storage//', '/', $absoluteUrl);
$absoluteUrl = trim($absoluteUrl);
$imagesData[] = [
'src' => $absoluteUrl,
];
}
Metadata
Metadata
Assignees
Labels
No labels