Polylang
Polylang is a translation management plugin for WordPress. WP Media Cloud and Polylang work together without conflict and without any configuration. Polylang does not override WordPress’s attachment URL generation functions, so WP Media Cloud’s standard URL rewriting handles all media field resolution automatically.
How they work together#
Polylang stores language assignments for posts and attachments in its own term taxonomy, but it does not modify how WordPress generates attachment URLs. All standard attachment URL functions — wp_get_attachment_url(), wp_get_attachment_image_src(), and wp_get_attachment_image() — are filtered by WP Media Cloud at priority 99 and return cloud storage or CDN URLs as normal. No special handling is needed for Polylang.
When a user creates a media translation in Polylang, Polylang creates a new WordPress attachment post for the translated version. That attachment goes through the standard WordPress upload pipeline and is offloaded to cloud storage by WP Media Cloud automatically, exactly like any other attachment upload.
Domain and subdomain URL modes#
Polylang supports several URL structures for multilingual sites: subdirectory, subdomain, and separate domain per language. In subdomain and separate domain mode, Polylang filters wp_upload_dir() to adjust the domain in URLs for theme and plugin assets. This filter runs at a lower priority than WP Media Cloud’s URL rewriter and only applies in those specific URL modes.
In the default subdirectory URL mode and query-string mode, Polylang does not apply any upload_dir filter. In subdomain or separate domain mode, WP Media Cloud’s priority 99 filter on attachment URL functions ensures cloud URLs are returned correctly regardless of Polylang’s domain adjustment.
Configuration#
No configuration is required in either plugin. WP Media Cloud detects Polylang automatically via the POLYLANG constant and reports its status on the Integrations tab. Polylang works with WP Media Cloud on free and Pro plans without any plan-specific limitations.
Troubleshooting#
Images on translated pages are showing local URLs
Confirm URL rewriting is enabled in WP Media Cloud > Settings. Also confirm the image has been offloaded — go to Media > Library, click the image, and check its URL. If it shows the local site URL the file has not been offloaded. Run the bulk migration tool to offload existing media. If images are offloaded but still showing local URLs on translated pages, check whether a caching plugin is serving a cached version of the page with old URLs. Clear the page cache after configuring WP Media Cloud.
Translated attachment is not being offloaded
When Polylang creates a media translation, the new attachment post goes through the standard WordPress upload pipeline. Confirm that automatic offloading is enabled in WP Media Cloud > Settings and that the storage connection test passes. If automatic offloading is disabled, the translated attachment will need to be offloaded via the bulk migration tool.