Import Error "not a valid image"

Since this morning I get an Error if I try to import my exported Site with Neos 3.3:

During the import of the "Sites.xml" from the package "My.Site" an exception occurred: Error: During import an exception occurred: "Could not convert target type "Neos\Media\Domain\Model\Image": Tried to refresh the dimensions and meta data of Image asset "" but the file of resource "583bef9c5b7d32ad3c154fd6421d243f9ee3714b" does not exist or is not a valid image."., see log for further information.

I tried the whole day to find a solution but nothing worked. The file 583bef9c5b7d32ad3c154fd6421d243f9ee3714b exists and looks completely fine.

I can still import an old export but as soon I add an image I get this error while importing a new export. It does not matter if it’s a JPEG or GIF or PNG.

I remember having this once where it was caused by a missing image library, interlcaed-PNG or something… Can you do the import on the machine where you created the export, but it fails e.g. on your local machine? Then this might be the same cause.

1 Like

Last night, I had a weird experience too, - on applying the ‘import a site command’ …
(on Neos 4.0 with exported content/resources from Neos 4.0)

  • encountered a similar error like yours …

  • checked if the resource existed … (YES, like in your case there were regular imageFiles available …

  • ‘site:prune’ did not help either …

  • finally, by cleaning the resources with the ‘resource:clean’ command, the problem was solved … at the END


  • WEIRD BEHAVIOR on cleaning: I had to REPEAT the resource:cleanCommand MULTIPLE times, - and despite that the confirmation was ‘that all the corrupted files would be deleted’ - there was deleted just ONE at the time …

  • ONCE all resources were cleaned, I could import the site without further problems …


Maybe it will help for you too … :slightly_smiling_face:

2 Likes

As far as I remember import always worked like this. I remember that behaviour since Neos 3.0. I can say only that it’s stable. Export/Import on same machine rarely works on the first time.

Do what Christoph wrote and it should work like charm for Neos.

And please write have you succesed.

1 Like

Thanks for your hints. I managed to bring my Neos content on the server with a copy of the “Persistent” folder and a dump of my DB. Therefore I can’t say if it would have worked without error with the “resource:clean” command. Interesting is the fact that the export and import works from the new server installation to my local installation. With the same images I had troubles before.