2.2.5
What’s Changed
Fixed
- Critical: Self-hosted videos never played — ACF compat layer returned raw numeric attachment IDs from
$block['data'], but the template expected arrays withurlandmime_typekeys. Now resolves IDs viawp_get_attachment_url()/get_post_mime_type(), which also enables CDN URL rewriting. - Critical: Poster image for self-hosted videos had the same numeric ID issue. Now resolved via
acf_blocks_resolve_image(). - Controls toggle ignored: Strict comparison
$controls !== falsewas always truthy for ACF’s0value. Changed to truthy check. - Video cropping: Changed
object-fitfromcovertocontainfor self-hosted<video>elements to prevent content cropping.
Added
- Self-hosted video URL support: The Video URL field now appears for self-hosted type, allowing direct/CDN URLs that override the media library file upload.
- Lazy-load self-hosted videos: Non-autoplay self-hosted videos defer network requests until near the viewport via IntersectionObserver (200px root margin).
- Smarter preload: Self-hosted videos with a poster image and no autoplay use
preload="none"instead ofpreload="metadata"for faster page loads.
Commits
- v2.2.5: Self-hosted video URL support, lazy-loading, and performance improvements (
af0dba3) - fix: resolve self-hosted video playback broken by compat layer returning raw attachment IDs (
e4608fc)
Stats
- Commits: 2
- Changes: 6 files changed, 130 insertions(+), 17 deletions(-)
Plugin Info
- Blocks included: 29
- Requires WordPress: 6.0+
- Requires PHP: 7.4+
- Requires: ACF Pro 6.0+ or Secure Custom Fields
Installation
- Download
acf-blocks-plugin-*.zipfrom the assets below - Go to Plugins → Add New → Upload Plugin in WordPress admin
- Upload the zip file and activate
