1

I have added an image field with Translatable Content enabled. My content type has enabled translations too. But when I add an image in the translation, the english contents field get replaced with the newly added translated image. (English is my base language, and I have Japanese and Chinese as translations). This happens vise versa too. What could be the issue?

2

By default only the image alt and title are translatable and the file itself isn't. By the default the file is always the same in all languages. You can simply make the file to be translatable as well under https://example.com/admin/config/regional/content-language.

enter image description here

Note: After you've done this, all your existing translations will need to have the file re-uploaded (or a new file uploaded), as the default only gets added once when translating content through the UI.


Taken the above Hero image field this can be done manually be editing field.field.node.page.field_hero_image.yml (which translates to field.field.ENTITY_TYPE.BUNDLE.FIELD_NAME.yml):

Before file checked:

third_party_settings:
  content_translation:
    translation_sync:
      alt: alt
      title: title
      file: '0'

After file checked (alt and title are mandatory if file is checked, that's why they have '0' now):

third_party_settings:
  content_translation:
    translation_sync:
      file: file
      alt: '0'
      title: '0'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.