Meta Box
This page explains how WP Media Cloud works with Meta Box. Image and file fields that store attachment IDs serve CDN URLs with no setup. Fields that store a URL, such as File Input, need one extra step.
What the integration does#

There is no Meta Box integration class in WP Media Cloud. The plugin only detects Meta Box (through its RWMB_VER constant) and shows its status on the Integrations page.
It works because Meta Box turns attachment IDs into URLs with standard WordPress functions. WP Media Cloud filters those functions at priority 99:
| WordPress function or filter | What WP Media Cloud returns |
|---|---|
wp_get_attachment_url | The CDN URL of the file |
wp_get_attachment_image_src | The CDN URL of the requested size |
wp_calculate_image_srcset | CDN URLs for each srcset entry |
wp_prepare_attachment_for_js | CDN URLs in the media picker data |
This happens on the fly as pages load. Nothing in your field data is changed. For an image field, rwmb_meta() returns url, full_url and srcset built from these functions, so all three use the CDN.
Which fields work#
| Meta Box field | What it stores | Served from the CDN? |
|---|---|---|
| Image, Image Advanced, Image Upload, Single Image | Attachment IDs | Yes, automatically |
| File, File Advanced, File Upload | Attachment IDs | Yes, automatically |
| Video | Attachment IDs | Yes, automatically |
| File Input | The file URL as text | Not by ID. See below |
| Background | The image URL inside a saved array | Not by ID. See below |
Image and file sub-fields inside a Group field work the same way.
What you need to switch on#
There is no Meta Box setting in WP Media Cloud. Check these:
- In Media Cloud > Settings, make sure Rewrite URLs is on.
- Offload existing media with Offload All Media in the Dashboard Bulk Offload card.
- Open Media Cloud > Integrations. The Meta Box card shows Active and the version. This status can take up to 5 minutes to update.
URL-based fields and URL Replace (beta)#
The File Input and Background fields save a URL, not an attachment ID. WP Media Cloud cannot look that URL up, so it is printed as saved.
- If the URL is printed inside post content, the content rewriting changes it to the CDN as the page loads, once the file is offloaded.
- Elsewhere, run URL Replace (beta) from Media Cloud > Migration. It updates URLs saved in
wp_posts,wp_postmetaandwp_options. - URL Replace does not scan custom tables,
wp_termmetaorwp_usermeta. File Input values stored there keep their local URL. Use an ID-based field such as File Advanced instead.
ID-based fields do not need URL Replace. Back up your database before you run it. Revert selected to local URLs undoes the change.
Troubleshooting#
| What you see | What it means | How to fix it |
|---|---|---|
| An image field shows a local URL | Rewrite URLs is off, or the image is not offloaded | Turn on Rewrite URLs, then run Offload All Media |
| Some images in a multi-image field are local | Each image is rewritten on its own, and some are not offloaded | Offload the missing images |
| A File Input or Background field shows a local URL | The field stores the URL as text | Run URL Replace (beta), or switch to an ID-based file field |