We built an all-in-one WordPress image toolkit. Here's the architecture behind it
We want to talk about why most WordPress image plugins exist as separate, single-purpose tools — and why we think that's the wrong approach. If you manage WordPress sites, you've probably installed some combination of these: an AI alt text generator, a compression plugin, a WebP converter, a media file renamer, and maybe something to catch broken images. Each one solves a real problem. But…
Most WordPress image plugins exist as standalone tools that each address a specific problem. However, this approach creates new issues. These plugins can conflict with one another, each storing duplicate metadata and enqueuing separate admin scripts on the same pages. When one plugin breaks after a WordPress update, debugging becomes a complex ordeal involving multiple plugins.
ImageCraft offers an alternative by combining all image optimization tasks into a single plugin. Instead of relying on credit-based AI alt text generators, ImageCraft connects directly to AI providers like Anthropic, OpenAI, and Google Gemini. This eliminates the need for middlemen and credit packs, as ImageCraft pays the providers at their published rates.
The plugin supports direct integration with three AI providers and handles image fetching, base64 encoding, MIME detection, and prompt construction. Additionally, ImageCraft generates combined meta information (alt text, title, and caption) in a single API call, reducing network round trips and token charges. For compression, ImageCraft leverages the server's Imagick library instead of external services.
It detects if Imagick is available, applies optimizations such as strip EXIF metadata and color profiles, progressive JPEG encoding, and downscales images if necessary. Original files are backed up, and a never-enlarge guard ensures that already-optimized images aren't unnecessarily enlarged. WebP sidecar files are generated alongside the original images, allowing the browser to choose the best format automatically.
This approach avoids breaking caching and CDN configurations, as the original URL remains as the fallback. ImageCraft also includes broken image fallbacks and cleanup functionality, ensuring that the original images and markup remain intact if any conversion issues arise.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.