Docs

Meta Box

3 min readUpdated November 9, 2026

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#

Meta Box card on the Integrations tab

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 filterWhat WP Media Cloud returns
wp_get_attachment_urlThe CDN URL of the file
wp_get_attachment_image_srcThe CDN URL of the requested size
wp_calculate_image_srcsetCDN URLs for each srcset entry
wp_prepare_attachment_for_jsCDN 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 fieldWhat it storesServed from the CDN?
Image, Image Advanced, Image Upload, Single ImageAttachment IDsYes, automatically
File, File Advanced, File UploadAttachment IDsYes, automatically
VideoAttachment IDsYes, automatically
File InputThe file URL as textNot by ID. See below
BackgroundThe image URL inside a saved arrayNot 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:

  1. In Media Cloud > Settings, make sure Rewrite URLs is on.
  2. Offload existing media with Offload All Media in the Dashboard Bulk Offload card.
  3. 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_postmeta and wp_options.
  • URL Replace does not scan custom tables, wp_termmeta or wp_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 seeWhat it meansHow to fix it
An image field shows a local URLRewrite URLs is off, or the image is not offloadedTurn on Rewrite URLs, then run Offload All Media
Some images in a multi-image field are localEach image is rewritten on its own, and some are not offloadedOffload the missing images
A File Input or Background field shows a local URLThe field stores the URL as textRun URL Replace (beta), or switch to an ID-based file field

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