I'm trying to import image with new media module on core 8.5.
I've a json source and on my .yml I've:
field_media_image:
target_id:
plugin: migration
migration: immagini
source: fid
This works, immagini is another importer that imports files.
In the new media there is also an "alt" (mandatory) and "title" attribute on the media entity. But if I try to add something like this, it doesn't work (alt_text is the correct source for alternative text). The media is created but is not referenced to the correct id:
field_media_image:
alt: alt_text
target_id:
plugin: migration
migration: immagini
source: fid
How should I pass the alt attribute to this field? I also tried to use a syntax like:
field_media_image:
target_id:
plugin: migration
migration: immagini
source: fid
'field_media_image/alt': alt_text
But it doesn't work, the media is created but there is no reference to the correct id.