Use the native loading="lazy" attribute, WordPress filter hooks, and a lightweight Intersection Observer fallback to lazy load all images and iframes on a WordPress site.
Images are consistently the largest contributors to page weight on WordPress sites. A typical blog post with six to eight inline images easily transfers one to three megabytes of image data to each visitor, regardless of whether those images are visible on screen when the page loads. A long recipe post, a product review with…
When a theme or page builder stores an image as a plain URL (e.g. in a theme options field or an ACF text field), you lose access to the attachment’s alt text and title stored in the Media Library. The functions below let you look up an attachment by its URL and retrieve those attributes…
Web accessibility is often treated as an afterthought, but a few targeted improvements can make a significant difference for screen-reader users and assistive technology in general. This article covers two concrete areas: image role attributes and accessible table markup.
If you suddenly cannot add a featured image, upload files to the Media Library, or select images in Advanced Custom Fields — and you see a JavaScript error in the browser console — the culprit is very likely a misconfigured Content Security Policy (CSP).
Your site runs on HTTPS, but images, scripts, or stylesheets are still loading over HTTP. Browsers block these “mixed content” requests — and in some cases they cause Gutenberg to fail saving. The root cause is almost always a hardcoded http:// URL somewhere in wp-config.php or the database.