KO – Strip Image Titles & Alt
Removes title and alt attributes from frontend WordPress images, including builder-rendered and dynamically injected images.
by KO · github.com/wy4tt34rp/ko-strip-image-titles · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/wy4tt34rp/ko-strip-image-titles/archive/refs/heads/main.zipRemoves title and alt attributes from frontend WordPress image output, including Divi and dynamically injected images.
Description
KO – Strip Image Titles & Alt removes image title and alt attributes from frontend image markup. This prevents browser hover labels caused by title attributes and removes alt attributes from the rendered HTML without modifying Media Library data.
The plugin handles several common image output paths:
- Standard WordPress attachment images
- Featured images
- Images inside post/page content
- Builder or shortcode-generated image markup
- Frontend image output that bypasses normal WordPress image filters
- Images injected after page load by sliders, carousels, lazy loading, or page builder scripts
The plugin intentionally removes alt attributes from frontend image markup. This changes the accessibility information available to assistive technologies.
Installation
- Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
- Activate KO – Strip Image Titles & Alt.
- Clear any site, page, CDN, and browser cache.
- Re-test image hover behavior on the frontend.
How It Works
Version 1.1.0 uses multiple layers:
- A WordPress image attribute filter removes title and alt attributes from normal attachment image output.
- HTML filters remove title and alt attributes from img tags in content, featured images, and image tag output.
- A frontend output buffer catches image markup generated outside normal WordPress filters.
- A lightweight JavaScript fallback removes title and alt attributes from images injected or changed after page load.
Notes
If hover text still appears after activation, clear all caches first. Cached HTML may still contain old image title attributes until the cache is rebuilt.
Changelog
1.1.0
- Renamed the plugin to KO – Strip Image Titles & Alt.
- Added broader frontend markup cleanup for img title and alt attributes.
- Added output-buffer safety net for builder/plugin-generated image HTML.
- Added JavaScript fallback for carousel, slider, lazy-loaded, dynamically injected, and dynamically changed images.
1.0.0
- Initial release.
- Removed title attributes from normal WordPress attachment image output.