- Issue created by @pau.sanz
- Merge request !20Add support for image alt text when importing media image from CSV → (Open) created by Unnamed author
I needed to use the Media import type provided by the module, and I noticed that it currently doesn't import the alternative text for images from the CSV file — for example, from a column like field_media_image_alt.
The column name can be anything, as long as it ends with _alt, since it's dynamically matched to the corresponding image field.
Adds logic to the add() method of the CSV Importer plugin to allow setting the alt attribute on image fields within Media entities.
The logic looks for any CSV column that ends with _alt and matches it with the corresponding image field (e.g., field_media_image + _alt). If found, the field is constructed as an array containing both target_id and alt.
Active
2.0
Code