Docs

ACPT

3 min readUpdated June 28, 2026

ACPT (Advanced Custom Post Types) by Giovambattista Fazioli is a data modeling framework for WordPress. WP Media Cloud includes a dedicated integration for ACPT because ACPT builds media URLs differently from other custom field plugins — it bypasses WordPress’s standard attachment URL functions and constructs URLs directly from the uploads directory base URL. WP Media Cloud intercepts at the upload directory level to ensure ACPT field values resolve to cloud storage URLs.

Why ACPT needs a dedicated integration#

ACF, Meta Box, JetEngine, and Pods all resolve attachment IDs to URLs by calling WordPress’s standard attachment URL functions, which WP Media Cloud already filters. ACPT does not. ACPT builds every media URL internally using wp_upload_dir()['baseurl'] concatenated with the file path from attachment metadata. This bypasses WP Media Cloud’s standard URL rewriting entirely.

WP Media Cloud handles this by filtering wp_upload_dir() at priority 999 and replacing the baseurl and url fields with the active CDN base URL. The filesystem fields (basedir and path) are left untouched so upload handling and image editing on the server continue to work correctly. The filter is skipped in the WordPress admin to protect the media library and upload tools, but applies during REST API requests so Gutenberg and page builder AJAX calls receive CDN URLs.

Which field types are covered#

The integration covers all ACPT field types that build URLs through the internal media resolution path:

  • Image field
  • Gallery field
  • Image Slider field
  • Video field
  • Audio field
  • File field

The fix applies to both ACPT shortcode output and direct PHP acpt_*() function calls. Page builders that use ACPT’s internal WPAttachment class to resolve field values also benefit.

Object cache TTL#

ACPT’s WPAttachment class maintains an internal one-hour object cache. If ACPT resolved a field value before WP Media Cloud was configured or before the integration was active, the cached value will contain the local URL. The cached value persists until the one-hour TTL expires or the post is re-saved. If you see a local URL in an ACPT field immediately after configuring WP Media Cloud, re-save the post or wait for the cache to expire.

Configuration#

No configuration is required. WP Media Cloud detects ACPT automatically and initializes the upload directory filter. ACPT’s status is reported on the Integrations tab. The integration respects the global URL rewriting toggle in WP Media Cloud > Settings — if URL rewriting is disabled, the upload directory filter does not run.

Troubleshooting#

ACPT field values are still showing local URLs
Check two things. First, confirm URL rewriting is enabled in WP Media Cloud > Settings. Second, check whether the ACPT object cache is serving a stale value — re-save the post and reload the page. If the URL updates after re-saving, the cache was holding a pre-integration value. Wait one hour or re-save all affected posts to clear the cache.

ACPT field values in the WordPress admin are showing CDN URLs
This should not happen — the upload directory filter is skipped in wp-admin except for REST API requests. If admin URLs are being rewritten, check whether another plugin is also filtering upload_dir in a way that conflicts with WP Media Cloud’s admin check.

Images uploaded through ACPT are not being offloaded
File uploads through ACPT go through the standard WordPress media library upload pipeline, which WP Media Cloud intercepts for automatic offloading. If files uploaded through ACPT are not being offloaded, confirm that automatic offloading is enabled in WP Media Cloud > Settings and that the storage connection test passes.

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