I used the following migration file to migrate user pictures from a Drupal 7 site installation to Drupal 8:
migrate_plus.migration.drupal7_image.yml
id: drupal7_image
label: Images
migration_group: dhm_migrate_taxonomy
migration_tags:
- Drupal 7
source:
plugin: d7_file
constants:
source_base_path: '/var/www/html/migrate_training_7/web/'
process:
fid: fid
filename: filename
source_full_path:
-
plugin: concat
delimiter: /
source:
- constants/source_base_path
- filepath
-
plugin: urlencode
uri:
plugin: file_copy
source:
- '@source_full_path'
- uri
filemime: filemime
status: status
created: timestamp
changed: timestamp
uid: uid
destination:
plugin: entity:file
migration_dependencies: {}
And I am using this next snippet to link the migrated image files to the user picture field (This is used in my user migration file):
migrate_plus.migration.custom_user.yml
user_picture: # Image field name in Drupal 8 site
plugin: iterator
source: user_picture # Image field name in Drupal 7 site
process:
target_id: fid
alt: alt
title: title
width: width
height: height
migration_dependencies:
required:
- drupal7_image
I can see that the files are being migrated and downloaded to my Drupal 8 installation but when I check the users I don't see any user pictures (fields are blank).
I really don't know what I am missing, I searched for examples on the Internet but I didn't find much.
Any help would be much appreciated. Thanks in advance. ;)