I figured it out from sub_process
plugin's documentation:
/**
* Available configuration keys:
* ...
* - include_source: (optional) If TRUE, all source plugin configuration and
* values will be copied into the sub-processed row in a new property named
* for the source_key configuration value (see below). Defaults to FALSE.
* - source_key: (optional) If include_source is TRUE, this
* is the name of the property of the sub-processed row which will contain
* the source configuration and values. Ignored if include_source is
* FALSE. Defaults to 'source' if no value is provided.
*/
And used it as:
field_cover_image:
- plugin: sub_process
source: field_cover_image
include_source: true
source_key: root
process:
target_id:
plugin: migration_lookup
source: target_id
migration: migrate_media_image
source_ids:
migrate_media_image:
- target_id
- root/langcode # <- get property from the root row
And of cause constants also will be available:
migrate_media_image:
- target_id
- root/constants/default_language
An alternative could be creating iteration property as default value:
plugin: sub_process
source: field_cover_image
process:
lang:
plugin: default_value
default_value: 'en'
and refering to it as current iteration destination property @lang
:
lang:
plugin: default_value
default_value: 'en'
target_id:
plugin: migration_lookup
source: target_id
source_ids:
migrate_media_image:
- target_id
- '@lang'
The content/media types set to be translatable but actually there is just one language and I can "hardcode" it, but it is better to use dynamic value.