A lightweight WordPress plugin that converts JPEG and PNG uploads to WebP on your server โ no API, no account, no monthly limits.
Project Overview
Hooks into WordPress's native upload pipeline to replace images with WebP equivalents โ including every thumbnail size.
Silent conversion on upload
Every JPEG and PNG uploaded through WordPress is automatically converted to WebP in the same request โ editors and authors don't need to do anything.
Replaces the file entirely
Unlike plugins that create a secondary .webp alongside the original, Halka updates the attachment record itself โ no redirect rules, no duplicate files.
All thumbnail sizes converted
Thumbnail, medium, large, and every custom registered size is regenerated as WebP so srcset, featured images, and Media Library previews are always correct.
Fully self-hosted
Uses only WordPress's built-in WP_Image_Editor backed by GD or Imagick. Everything runs on your server โ no external HTTP requests, no third-party services.
Key Features
Everything to optimize images from day one โ and convert what's already there.
Auto convert on upload
Converts JPEG, PNG and optionally GIF the moment they land in the Media Library.
Bulk converter
Batch-processes existing Media Library images in small AJAX batches โ safe on shared hosting.
Per-image button
A Convert to WebP button on every Media Library row for on-demand conversion without a full bulk run.
Quality controls
Separate quality settings for WebP and JPEG. Max dimension capping with auto-resize on upload.
Metadata stripping
Optionally strips EXIF and IPTC metadata via Imagick before conversion to reduce file size further.
Savings indicator
Shows the percentage file size reduction per image directly in the Media Library column.
Secure AJAX handlers
All conversion actions protected with nonces and WordPress capability checks.
Safe fallback
If conversion fails for any reason the original file is preserved and returned untouched.
Free Plugin Comparison
Compared to the most popular free WebP plugins on WordPress.org.
No monthly image limit
Smush free caps at 50 images/month. ShortPixel gives 100 credits/month then stops. Halka converts every image on every upload, forever, at no cost.
Zero setup friction
Every major free plugin requires account creation and API key configuration. Halka activates and runs immediately โ configure quality in Settings, done.
No server configuration
WebP Express and similar tools need .htaccess or Nginx rules. Halka needs nothing outside WordPress itself โ works on any host, any setup.
Every thumbnail size converted
Most free plugins convert only the full-size original and leave JPEG thumbnails. Halka regenerates every registered size so srcset, featured images, and previews are all WebP.
Bulk conversion that doesn't crash
Explicitly destroys Imagick objects via PHP Reflection after each image to prevent memory exhaustion โ the primary reason other self-hosted bulk tools silently hang on shared hosting.
Technologies
No external libraries โ only WordPress core APIs and standard PHP.
PHP 7.4+
Server-side OOP class architecture and image processing pipeline
WP_Image_Editor
Native WordPress image API โ no external image libraries required
Settings API
Options registration, sanitization, and settings page rendering
AJAX API
Nonce-protected handlers for bulk batches and per-image conversions
GD / Imagick
PHP image encoding โ Imagick preferred, GD used as fallback
jQuery (bundled)
Progress bar, AJAX calls, and per-image button interactions
CSS3
Settings page layout and Media Library column styling
PHP Reflection
Explicit Imagick destruction after bulk conversion to prevent memory exhaustion
Requirements
Works on any standard WordPress hosting. WebP is supported by the vast majority of modern hosts.
PHP Version
7.4 or higher
WordPress
6.0 or higher
Image Library
GD or Imagick
WebP Encoding
GD 2.0+ or Imagick with WEBP
External API
None required
Server Config
No changes needed