- Status
- Open
- Reported for
- WPML Media Translation 2.7.2
- Topic tags
- Bug
Overview of the issue
When you edit and crop a featured image in the default language, the cropped version does not appear in the translated pages. Instead, the translated pages display the original, uncropped version of the image.
Workaround
Please, make a full backup of your site before proceeding.
- Install WPML Media Translation plugin
- Be sure your image has a title and it is translated via WPML Media
- Go to WPML > Settings > Media Translation
- If the ”Automatically detect best options for translating image texts (alt, caption, title)” option is active, then disable it
- Under How to handle Media Library texts (alt, caption, title) enable the ”Translate Media Library texts (alt, caption, title) when translating content” option.
- Then, open …/wp-content/plugins/sitepress-multilingual-cms/classes/media-translation/MediaTranslationStatus.php file.
- Look for line 174.
- Change:
return $attachment_translation_id;
- For:
$this->copy_attached_file_info_from_original( $attachment_translation_id, $attachment_id ); return $attachment_translation_id;
- Save the change.
- Make a small change to the post and its image title on default language.
- Update the translation