WPML
This page explains how WP Media Cloud works with WPML. It covers the two WPML media cases WP Media Cloud handles, what to check, and how deleting translated media behaves.
What the integration does#

WP Media Cloud tracks each offloaded file by its attachment ID. WPML gives every language its own attachment ID, so WP Media Cloud adds two WPML hooks. They are active whenever WPML is active. They only run once your storage is fully set up.
| Case | WPML hook | What WP Media Cloud does |
|---|---|---|
| Same file in every language | wpml_after_copy_attached_file_postmeta | WPML creates a translated attachment that points to the original file. WP Media Cloud copies the original’s offload record to the new ID. The translation then gets the CDN URL. Nothing is uploaded again. |
| A different file for one language | wpml_added_media_file_translation | An editor uploads a language-specific file. WP Media Cloud finds the new attachment by its file path and offloads it like a new upload. |
Both hooks run even when Offload on upload is off.
URL filters. WPML filters wp_get_attachment_url at priority 10. WP Media Cloud filters it at priority 99, so it runs last and returns the CDN URL for offloaded files.
WPML Media Translation#
Uploading a different file per language needs the WPML Media Translation add-on. You do this under WPML > Translations, on the Media tab. See Translating images with WPML Media Translation.
The WPML Multilingual card on the Media Cloud > Integrations page shows two lines:
| Line | What it shows |
|---|---|
| Cloud sync | On when storage is fully configured. No storage means the hooks above do nothing yet. |
| Media Translation | The WPML Media Translation version, or None if the add-on is not active. |
When a translation has no record#
The record copy only works if the original is already offloaded when WPML creates the translation. If WPML creates it earlier, or before you installed WP Media Cloud, the translation has no record and shows the local URL.
WP Media Cloud then offloads the translation as its own item, from the local files. Its files go to the same paths as the original, so nothing is duplicated in the bucket. With Offload on upload on, a WP-Cron check does this about 5 minutes after the attachment is created. Offload All Media also picks up these translations.
This needs the local files. If Remove local files already deleted them, the offload fails with a missing file error.
Deleting media#
A translation that shares the original’s file also shares its files in the bucket. With Delete from cloud when deleted in WP on, WP Media Cloud 1.1.9 or newer checks whether another attachment still uses the same file.
- If another attachment, such as the original or another translation, still uses the file, the cloud files are kept. Only the deleted attachment’s record is removed.
- When you delete the last attachment that uses the file, its files are deleted from the cloud.
- Deleting a translation that has its own language-specific file only deletes that file.
What you need to switch on#
There is no WPML setting in WP Media Cloud. Check these:
- Finish storage setup so the Cloud sync line on the WPML Multilingual card shows On.
- Go to Media Cloud > Settings and make sure Rewrite URLs and Offload on upload are on in the Offload Behaviour card.
- Offload existing media with Offload All Media in the Dashboard Bulk Offload card. This includes translations that already exist.
The Integrations status can take up to 5 minutes to update after you activate WPML.
Troubleshooting#
| What you see | What it means | How to fix it |
|---|---|---|
| A translated page shows a local featured image | The translated attachment has no WP Media Cloud record | Wait about 5 minutes, or click Offload now on that item in Media > Library (list view). For many items, run Offload All Media |
| A translation shows Offload failed with a missing file | Remove local files deleted the shared files first | Click Download All to Server under Restore to Server on the Dashboard. Then click Retry all in the Bulk Offload card |
| A language-specific file stays local | Storage is not fully set up, or WPML Media Translation is not active | Check that Cloud sync shows On and Media Translation shows a version. Then use Offload now on the file |
| URLs look doubled or broken | Another plugin changes attachment URLs between priority 10 and 99 | Deactivate other media URL plugins one at a time to find it |