2

I used the Drupal migration module (browser) to migrate a Drupal 7 site to Drupal 8. Even though I had to restart the migration a few times, it migrated all the users and the nodes.

I can't figure out how to migrate the images into the database. I'd like to use the new Media entity in Drupal 8, but I have no idea how to migrate the images. Considering these options: writing a custom module, using existing plugins, exporting as csv in Drupal 7 (Views Data Export) & importing in Drupal 8, or some other method.

Once I get them migrated, they will of course need to be associated with the node they are used, which relies on the user reference too.

Any help would be greatly appreciated.

8
  • Have you looked at the pages to see if the image links are still intact? And have you verified that the images have been copied to the folder your new nodes are looking for them? I don't believe migration will move images, but it should preserve the links if your images are moved to the proper folder. Sep 5, 2018 at 19:30
  • I looked at the page and there are no image links present. Images will not be moved by migration, but since there's no reference to them on the migrated Drupal 8 site it won't find them anyways. I don't think that a default migration will copy image links. I'm thinking of using Views Data Export on the Drupal 7 site and exporting into a CSV (data, image references, all node fields) and then importing into the Drupal 8 site, but seems there should be a simpler or more elegant solution out there.
    – josephgut
    Sep 5, 2018 at 20:13
  • We are using the Restful module for our migration -- basically created a feed and scripting it in on the other end. I'm not sure if that will help you, but, it's pretty easy since the API resolves all the loose ends for you. Good luck! Sep 5, 2018 at 20:22
  • Yes, if the images are just img tags in text fields (WYSIWYGs), you'd have to write some sort of conversion script for that yourself. I have seen a few blog posts talking about this, might want to look around.
    – Kevin
    Sep 5, 2018 at 20:29
  • image tags in text fields should be preserved if you WYSIWYG is configured to show them. Your content shouldn't be modified by the export-import process. I say "shouldn't" Have you checked your WYSIWYG profiles? Sep 5, 2018 at 20:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.