I created an image in Media library using Sitecore Unversioned Media Template. After addign image in say En, if I add a diffrent image for Spanish and come back and check English image, it shows the Spanish one. Similarly all language versions of the image field is showing the same last updated language image.
1 Answer
That's the whole point of Unversioned
media items. Unversioned means that there are no separate language versions. It's one shared.
If you set one in English, it will be same for any other language. If you change something in Spanish, it will be applied to all languages, including English.
If you want language specific media items, use Versioned
template.
It's a bit confusing as when it comes to fields it's Shared
checkbox which states whether field should have only single value shared for all languages, and Unversioned
field checkbox has another meaning. Naming Unversioned
for media items suggests something else. But still, this is how it works.
-
CMS isuue is fixed. But in the site, only En version images are showing even in other languages. Commented Jan 20, 2022 at 13:21
-
How are links to images rendered? Can you create another question showing the code used for generation of image links (or which SXA component you use), what it the url which is rendered, what are response cookies of image response (which site does it use and language)?– Marek Musielak ♦Commented Jan 20, 2022 at 13:23
-
Okay. There is not much code written for it. Just fetching the image item from sitecore and showing it Commented Jan 20, 2022 at 13:25
-
You can read here about embedding language in media link: doc.sitecore.com/xp/en/developers/100/…– Marek Musielak ♦Commented Jan 20, 2022 at 13:31
-
Thanks. So just changing the template to versioned, has fixed the issue it seems. But this image alone is highly caching that it just shows En image alone. Commented Jan 20, 2022 at 16:25