Skip to content

[woocommerce_product_image_upload_error] #108

@Awais-Koder

Description

@Awais-Koder

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions