Docs

Polylang

3 min readUpdated November 9, 2026

This page explains how WP Media Cloud works with Polylang. Images on translated pages get CDN URLs with no setup, but media translations need their own offload record, which matters if you remove local files.

What the integration does#

Polylang card on the Integrations tab

WP Media Cloud has no Polylang hooks. The Polylang class only detects Polylang and shows its status on the Integrations page. Everything else comes from the normal URL rewriting:

  • Polylang keeps media as normal WordPress attachments. Their URLs come from wp_get_attachment_url(), wp_get_attachment_image_src() and wp_get_attachment_image(), which WP Media Cloud filters at priority 99.
  • Image URLs inside post content are rewritten through the_content, so translated posts get CDN URLs too.
  • All URL modes work: directory, subdomain, one domain per language and query string. In the domain modes Polylang changes the domain of the uploads URL. That does not affect offloaded files, because their CDN URL comes from the WP Media Cloud record.

Media translations#

When you translate a media item in Polylang, Polylang creates a new attachment for the new language. It does not copy the file. The new attachment points to the same file as the original.

WP Media Cloud tracks each attachment by its ID. A new translation starts with no WP Media Cloud record, so it shows the local URL until it is offloaded. Here is what happens next:

SituationResult
Local files are still on the serverThe translation is offloaded as its own item. 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 offloads it about 5 minutes after it is created.
Remove local files is on and the original’s files are goneThe offload fails with a missing file error. The translation is listed as failed in the Dashboard Bulk Offload card.
Offload on upload is offThe translation stays local until you run Offload All Media or use Offload now in the Media Library.

Translations only matter where a URL is built from the attachment ID, such as a featured image or gallery. Images placed in post content are rewritten by URL, so they show the CDN URL either way.

Deleting media#

Translations of one media item share the same 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.
  • If you delete a translation with no record, nothing is deleted from the cloud.

What you need to switch on#

There is no Polylang setting in WP Media Cloud. Check these:

  1. Go to Media Cloud > Settings and make sure Rewrite URLs and Offload on upload are on in the Offload Behaviour card.
  2. Offload existing media with Offload All Media in the Dashboard Bulk Offload card. This includes translations that already exist.
  3. Open Media Cloud > Integrations. The Polylang card in the Multilingual section shows Active. This status can take up to 5 minutes to update.

If you use Polylang media translations, it is safest to keep Remove local files off. See Local file removal.

Troubleshooting#

What you seeWhat it meansHow to fix it
A translated page shows a local featured imageThe media translation has no WP Media Cloud record yetWait about 5 minutes, or click Offload now on that item in Media > Library (list view)
A translation shows Offload failed with a missing fileRemove local files deleted the shared files before the translation was offloadedClick Download All to Server under Restore to Server on the Dashboard. Then click Retry all in the Bulk Offload card
Images are offloaded but translated pages still show local URLsA page cache is serving old HTMLClear your page cache

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only