Change the Image tag attribute mapping in Sitecore
By default, when you click Select in the Insert from DAM pop up, Sitecore generates an Image tag in the Image field.


However, you can configure different attribute mappings on the DAM Image tag attribute. You can add as many attribute mappings as you want.
Add a new attribute mapping
To add a new attribute mapping:
-
In the Content Editor, navigate to the /sitecore/system/Modules/DAM/Config/Mapping folder.
-
Right-click on the folder, click Insert, and then click Attribute. Enter the name for the new item, for example,
Title. -
On the Content tab, in the Data section, fill out the following fields:
Field Content Content Hub Attribute The name of the attribute in the Content Hub Sitecore Attribute The attribute name in the Sitecore Image tag NoteThe value in the Sitecore attribute field must follow XML attribute standards. Special characters, such as empty spaces or white spaces, are not allowed.
-
Click Save.
-
To verify the attribute and structure in the Sitecore Content Hub, open a browser tab and enter the URL for the attribute entity, for example,
https://<your content hub URL>/api/entities/9782.NoteIn the example URL, replace 9782 with the ID of the entity item you have selected.
-
The browser shows the content hub attribute in JSON, for example,
Title:
NoteIf you use multilevel properties, for example,
"Description":{"en-us"...}, you must add the property name in the Content Hub Attribute field in Step 3 as, for example,Description.en-us.
Edit an existing attribute mapping
To edit an existing attribute mapping:
-
In the Content Editor, navigate to the /sitecore/system/Modules/DAM/Config/Mapping folder.
-
Select the attribute you want to change, for example, the Alternative item. On the Content tab, in the Data section, for example, set the Content Hub Attribute field to Filename:

-
Click Save.