I have my files migrated from D7 to D8 (using d7_file
source plugin to an entity:file
destination).
I then migrated those files to media (using file_entity
source plugin to an entity:media
destination), based off this post.
However, the images in my Drupal 7 nodes of which I'm migrating never had alt text. Therefore, I would like to use the Drupal 7 node title as both (a) the Media title and (b) its image alt text.
My files to media migration looks like this (a portion of it):
source:
plugin: file_entity
type: image
constants:
bundle: 'image'
process:
mid: fid
bundle: 'constants/bundle'
langcode:
plugin: default_value
source: language
default_value: "und"
# name: filename
uid:
plugin: default_value
default_value: 1
status: status
created: timestamp
changed: timestamp
field_media_image/target_id: fid
# field_media_image/alt: field_file_image_alt_text/0/value
destination:
plugin: entity:media
The commented out lines are what I'd like to use the node title (name
and field_media_image/alt
), but I'm not sure how to pull in the original Drupal 7 node title. Any suggestions are appreciated.