Webxperthub Media Optimizer optimizes your WordPress media library without slowing down your site or your server. It automatically compresses new uploads and converts them to WebP, and lets you bulk-process your entire existing media library safely in the background.
When Webxperthub Media Optimizer is enabled, every new image uploaded to your Media Library is automatically queued for optimization. A background process (WP-Cron) picks up queued images in small batches, so your server is never overloaded even if hundreds of images are queued at once.
Use the Bulk Optimize screen under Webxperthub Media Optimizer in your admin menu to queue your entire existing media library and watch a live progress bar as images are processed.
Skip optimization for specific attachments:
add_filter( 'mopw_skip_optimization', function( $skip, $attachment_id ) {
if ( get_post_meta( $attachment_id, '_never_optimize', true ) ) {
return true;
}
return $skip;
}, 10, 2 );
Override format/quality for specific attachments:
add_filter( 'mopw_before_optimize_args', function( $args, $attachment_id ) {
if ( has_term( 'print-quality', 'category', $attachment_id ) ) {
$args['quality'] = 95;
}
return $args;
}, 10, 2 );
Run custom logic after an image is optimized:
add_action( 'mopw_after_optimize', function( $attachment_id, $original_size, $new_size ) {
error_log( "Attachment {$attachment_id} shrank from {$original_size} to {$new_size} bytes." );
}, 10, 3 );