Can't use Media URLs in Export to Shopify

I have a really strange problem. We use Kirby to generate Shopify CSV lists for import. Everything is working fine. But Shopify can’t handle the cryptic Media URLs from Kirby. Does anyone know why? We have found a solution, but I would still be really interested to know why this doesn’t work and if there is possibly a better way than the one we have used now.

Doesn’t work

foreach ( $produkt_images as $image ) {
  $zeilen[] = [
    $handle,
    $image->url()
  ];
}

Works

foreach ( $produkt_images as $image ) {
  $zeilen[] = [
    $handle,
    str_replace('/var/www/xxx/xxx.de/','https://xxx.de/',$image->root())
  ];
}

What does this mean exactly that Shopify cannot handle these URLs? Do the files actually exists? Or is it that Shopify doesn’t want to import the URLs?

The URLs are working if I click them in my csv file! I can see it in the Browser. But Shopify told me at the import that the image doesn’t exist

Hm, the thumbs are generated when the url() method is called. So if you just have the URL and the file hasn’t been copied to the media folder yet, then calling the image will fail. But as soon as the file actually exists in the media folder, it should work.

That’s exactly the funny thing! The images are accessible via URL, but not for the Shopify import. Is it possible that a header is delivered that does not comply with the standard or makes the file for an import with other programming languages not possible?

What exactly is the error message from Shopify?

That’s also the bad thing. No error message, Shopify imports the products without images, they are simply ignored.