Getting Started

Deployment Deployment - Diagnose Migrations Staging

Site Management

Backups Client Reporting Passwords Plugin Automation Plugin Management - Global Plugins & Themes - Diagnose Plugins & Themes - General Plugins & Themes - Git Plugins & Themes - Logs Must Install White Label WordPress Updates

Caching & Performance

Caching Caching - Blogs/Articles Caching - Diagnose Caching - Git Caching - WooCommerce Redis Optimize & Scale

Security

Security Security - Firewall

SMTP, CDN & DNS

SMTP SendGrid CDN CDN - AWS CDN - Cloudflare CDN - Diagnose Domains & DNS

Server & Tools

Analytics & Logs CRON Jobs Database Debug Tool Git Monitoring PHP Settings Redirects SEO Tools Server Errors sFTP SSL

Staq Billing

Staq Billing > Account Staq Billing > Client Staq Billing > Setup

Media

Media Media - Diagnose Media - Optimize

Accounts & Billing

Accounts & Billing

General

WordPress Hosting Website Diagnose Troubleshoot - Other

Image Optimization, Compression and WebP


On this page

    The Staq infrastructure can optimize (compress size and convert to WebP) your WordPress media library images directly on the server — no third-party plugins or external services required. This reduces file sizes, improves page load speed, and optionally generates WebP versions of your images.

    Note: Media Optimisation is disabled by default. You must enable it once per website inside WordPress.

    How It Works

    Once enabled, optimisation runs automatically in the background. Before any compression takes place, your original images are safely backed up to S3, allowing you to restore them at any time.

    Staq uses proven server-side tools:

    • JPEG/JPG: Recompressed using jpegoptim
    • PNG: Optimised using pngquant + optipng
    • WebP: Generated using cwebp as a sidecar file (original files remain untouched)

    How to Enable Media (JPEG & PNG) Optimisation

    1. Log into the WordPress site.
    2. Click Staq Hosting.
    3. Open the Media tab.
    4. Enable Media optimisation.
    5. Adjust settings if required (defaults are recommended).
    6. Click Save Settings.

    Once saved, Staq will automatically queue a background job to process JPEG and PNG images in your media library.

    Enabling WebP Conversion

    WebP creates smaller versions of your images without replacing the originals.

    1. Go to Staq Hosting → Media.
    2. Enable WebP Conversion:

    Then ensure WebP delivery is enabled:

    1. Go to Optimizer → Media.
    2. Enable Serve next-gen images (WebP).

    When enabled, cached pages will automatically serve WebP images where supported.

    Note: WebP replacement does not apply to images inside CSS files.

    What Gets Optimised

    • JPEG/JPG: Compressed + optional WebP
    • PNG: Compressed + optional WebP
    • WebP: Not reprocessed
    • SVG: Not processed
    • GIF: Not processed
    • Videos: Not supported

    Minimum thresholds:

    • Under 10KB → compression skipped
    • Under 4KB → WebP skipped

    How Optimisation Is Triggered

    • On Upload: Images are queued immediately
    • Daily Scan: Detects unoptimised images via nginx logs
    • On Save: Saving settings triggers a full scan

    No manual action is required.

    Reverting to Original Images

    1. Go to Media → Overview
    2. Click Revert to Originals

    This restores images from S3 and removes generated WebP files.

    Statistics

    Overview Statistics

    To view total compression savings:

    • Go to Staq Hosting → Media → Overview
    • View total size reduction and performance gains

    Specific Image Statistics

    To view details for a specific image:

    • Go to Media Library
    • Select an image
    • Click More Details under the optimisation label

    Viewing WebP Images

    To confirm WebP is generated:

    • Open the image in the Media Library
    • Look for the Optimisation label
    • If WebP is enabled, you will see:
      • WebP file size
      • Compression savings
      • Option to copy the WebP URL

    Need some help?

    We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.