Contact us
Discuss a project
Setup guide · v1.5.0

Media Optimizer: step-by-step setup guide

Local AVIF and WebP conversion for every image on your site with zero cloud quotas: 1‑click compression right inside the WordPress Media Library, all 5 WP‑CLI commands, ICC color profile preservation, cached micro‑LQIP, inline CSS background‑image rewriting, Yandex Images / Google Images protection, and LCP acceleration.

Media Optimizer
WordPressWooCommerceAVIF / WebPLiteSpeedNginx / Apache
Jump to another guideMenu

Video tutorial (0:16) — step-by-step overview & setup

HD · English voiceover

Quick start: 3 steps to get running

Verify the image engine and storage directory

Open BIGOR STUDIO → Media Optimizer and confirm that Imagick (or GD) is detected. If you previously used another WebP/AVIF plugin with an uploads-webpc folder, keep it in "Converted files storage folder" — the plugin picks up gigabytes of existing files without re-encoding.

Choose a delivery mode and run compression

On Apache / LiteSpeed, enable .htaccess (with YandexImages and Googlebot-Image protection). On Nginx, use HTML <picture> or the ready-made location block. Click "Compress media library", optimize individual photos in 1 click inside the Media Library, or run wp bigor-media optimize.

Verify delivery with the 3-probe HTTP tester

Click "Test live AVIF/WebP delivery" on the Overview & Compression tab: the plugin sends real HTTP requests emulating Chrome, YandexImages, and Googlebot-Image and reports the actual Content-Type and Vary: Accept headers.

1. 1-click compression right inside the WordPress Media Library

With Media Optimizer v1.5.1, you can compress or re-compress individual images or a selected batch directly from the WordPress Media Library — without running a full-site scan:

  1. On the Settings tab, verify that "Status column and 1-click compression in Media Library" is enabled (it is on by default).
  2. In WordPress admin, go to Media → Library and switch to List view (the horizontal-bars icon to the left of the date filter, URL upload.php?mode=list). WordPress does not render custom columns in Grid view.
  3. The Media Optimizer column shows each file's status: green AVIF and WebP badges with thumbnail counts and actual disk savings in KB and percent.
  4. Click "Compress" or "Re-compress" next to any image — the original and all registered thumbnails are converted over AJAX in 1–2 seconds with no page reload.
  5. For a batch of files, select their checkboxes on the left, pick "Optimize AVIF/WebP" from the Bulk actions dropdown at the top, and click "Apply".
Performance on large catalogs: when a media library holds more than 2,000 files, single-item compression in the Media Library skips rescanning the entire uploads directory on every click to keep PHP responses instant. You can refresh overall totals anytime with the "Recalculate statistics" button on the Overview & Compression tab.
Media Optimizer status column in the WordPress Media Library list view
The Media Optimizer column in the WordPress Media Library list view (upload.php?mode=list): AVIF/WebP badges, real disk savings, and a 1-click compress button.

2. Delivery modes, inline CSS background, micro‑LQIP & 3‑probe tester

On the Delivery & Hosting tab, pick the delivery method that matches your server stack:

Delivery modeWhen to chooseHow it works
Apache / LiteSpeed (.htaccess)Shared hosting, ISPmanager, cPanel, LiteSpeed / OpenLiteSpeedThe web server transparently serves AVIF/WebP for JPG/PNG requests based on the Accept header — including CSS background-image rules in external stylesheets, with zero HTML modifications.
HTML <picture>Nginx without server config access, CDNs that ignore Vary: AcceptWraps <img> elements in <picture> (including Gutenberg render_block output, Elementor widgets, and .webp sources for PRO AVIF) while fully preserving responsive srcset and sizes.
Hybrid (.htaccess + <picture>)Maximum coverage on complex themes with external CDNsCombines server-level rules for CSS backgrounds with explicit <source> tags in HTML markup.

Enabling inline CSS background-image optimization (Elementor / Gutenberg)

  1. On the Delivery & Hosting tab, select HTML <picture> or Hybrid mode (in .htaccess mode the web server already delivers AVIF/WebP for all CSS backgrounds natively).
  2. Turn on "Optimize inline CSS background-image in <picture> mode" and click "Save".
  3. The plugin automatically detects both background-image: url(...) and shorthand background: ... url(...) (including &quot; HTML entities inside style attributes), rewrites URLs to ready AVIF or WebP files according to the browser's Accept header, and sends Vary: Accept for safe page caching.

Enabling cached micro‑LQIP and LCP protection

  1. On the Settings tab, enable "Generate micro-LQIP placeholders (16×10 WebP)" and save.
  2. For all new uploads, a .lqip file (~180 bytes, generated only for opaque JPEGs — PNGs with transparency are left untouched) is created automatically.
  3. If your library was compressed earlier: run wp bigor-media optimize --lqip over SSH — the plugin generates only the missing .lqip files without re-encoding existing AVIF/WebP assets.
  4. On the Delivery & Hosting tab, keep "Native HTML lazy-load (loading="lazy") without data:image/svg+xml + LCP hero protection" enabled: the primary product/above-the-fold image automatically gets fetchpriority="high" with no lazy attribute. Micro‑LQIP works independently and never forces loading="lazy" if you disable native lazy-loading.

Verifying delivery with the 3-probe live HTTP tester

On the Overview & Compression tab (at the bottom of the diagnostics card), click "Test live AVIF/WebP delivery". The plugin picks a real compressed image and executes 3 live HTTP probes:

  • Chrome / Safari / Yandex Browser: should receive Content-Type: image/avif (PRO) or image/webp alongside a Vary: Accept header.
  • YandexImages & Googlebot‑Image: when "Image search bot compatibility" is enabled, image crawlers reliably receive image/webp or the original JPEG/PNG so your image search traffic never drops.
AVIF/WebP delivery, image bots & OLS/Nginx snippets in Media Optimizer
Delivery & Hosting tab in Media Optimizer v1.5.0: .htaccess / / Hybrid modes, image crawler compatibility, and OpenLiteSpeed / Nginx snippets.

3. OpenLiteSpeed / Nginx, all 5 WP‑CLI commands & Cron worker

Web server / settingConfiguration notes
Apache / LiteSpeed EnterpriseOn the Delivery & Hosting tab, click "Apply .htaccess rules" (or run wp bigor-media htaccess). Stale duplicate blocks from older plugins are cleaned up automatically.
OpenLiteSpeedOpenLiteSpeed ignores Header append Vary Accept inside .htaccess — expand the "OpenLiteSpeed snippet (vhconf.conf)" box in the admin panel, paste it into your virtual host configuration, and gracefully restart OLS.
NginxExpand "Ready-to-use Nginx config" on the Delivery & Hosting tab and add it inside your server { ... } block (bot protection included), or switch delivery to HTML <picture> if you don't have server config access.
ICC profiles & only_smallerHeavy EXIF/GPS metadata is stripped while ICC color profiles are preserved so product colors stay true, and a converted file is kept only when it is strictly smaller than the original.

All 5 WP‑CLI commands & console Cron worker (PRO)

CommandPurpose & flags
wp bigor-media statusSummary of the image engine, web server, and disk savings. Flags: --recalc (full storage rescan), --format=json.
wp bigor-media optimizeLocal optimization of wp-content/uploads with a progress bar and Load Average throttling. Flags: --limit=N, --force (re-encode existing files), --lqip (backfill missing .lqip placeholders).
wp bigor-media testLive 3-probe HTTP delivery check (Chrome, YandexImages, Googlebot‑Image). Flag: --format=json.
wp bigor-media htaccessWrite or refresh rewrite rules in wp-content/.htaccess and remove outdated plugin blocks.
wp bigor-media reset-markersClear skipped/problem file markers (.deleted, .crashed) to retry them on the next run.
wp bigor-media status --recalc
wp bigor-media optimize --lqip
wp bigor-media test && wp bigor-media htaccess
* * * * * php /path/to/wp-content/plugins/bigor-studio-media-optimizer/cli/worker.php --queue >/dev/null 2>&1
Tip for large catalogs (10,000+ images): run php cli/worker.php --scan once for initial indexing, then add cli/worker.php --queue to your system crontab for continuous background processing — the worker monitors your Load Average ceiling (configured under Delivery & Hosting) and pauses automatically during traffic spikes. If you use a custom storage folder in admin settings, the worker picks it up automatically via .bsmo-config.json (or you can pass --storage-dir=/path/to/dir explicitly).

Frequently asked questions & troubleshooting

Are original JPG/PNG files ever deleted?

No. Originals inside wp-content/uploads always remain untouched — compressed AVIF, WebP, and micro-LQIP copies live in a separate directory (wp-content/uploads-webpc/ by default) and are removed automatically whenever you delete an attachment from the Media Library.

Why don't I see the Media Optimizer column in the Media Library?

Switch the Media Library from Grid view to List view (the list icon to the left above the filters — URL upload.php?mode=list) and verify that "Status column and 1-click compression in Media Library" is enabled on the Settings tab.

How do I generate micro-LQIP placeholders for images compressed in an earlier version?

Enable "Generate micro-LQIP placeholders (16×10 WebP)" on the Settings tab and run wp bigor-media optimize --lqip over SSH — the plugin builds only the missing .lqip files without re-encoding existing AVIF and WebP copies. Individual images can also be updated with the Re-compress button in the Media Library.

Why use native WP-CLI and the console cli/worker.php worker?

They are built for CI/CD automation and stores with tens of thousands of photos: the wp bigor-media status|optimize|test|htaccess|reset-markers commands run directly over SSH without HTTP timeouts, while cli/worker.php runs via system cron across multiple workers and auto-pauses when server Load Average rises.

Will native loading="lazy" hurt LCP, and does micro-LQIP depend on it?

No. Media Optimizer automatically sets fetchpriority="high" and strips lazy-loading from the main product image and above-the-fold hero visual. Both options are completely independent: even if you disable native_lazy_load, cached micro-LQIP continues working without forcing loading="lazy".

How does Yandex Images and Google Images protection from AVIF work?

When "Image search bot compatibility" is enabled, the .htaccess rules, Nginx config, and <picture> markup serve AVIF to modern browsers while serving WebP or JPEG to YandexImages, Googlebot-Image, and Pinterestbot. You can verify this in 2 seconds using the built-in 3-probe HTTP tester.

Does the plugin work with Elementor, Gutenberg, and CSS background-image?

Yes. HTML <picture> and Hybrid modes hook into Gutenberg (render_block) and Elementor widgets while keeping responsive srcset and sizes intact, and "Optimize inline CSS background-image in <picture> mode" converts both background-image and shorthand background: URLs to AVIF/WebP with a Vary: Accept header. In .htaccess mode, CSS backgrounds are rewritten directly by the web server.

Do I need to adjust the OpenLiteSpeed config when using .htaccess?

Yes, it is recommended: OpenLiteSpeed ignores Header append Vary Accept inside .htaccess. Media Optimizer detects OpenLiteSpeed automatically and displays a ready-to-paste vhconf.conf snippet on both Overview & Compression and Delivery & Hosting. LiteSpeed Enterprise and Apache require no extra configuration.

BIGOR STUDIO Engineering Support

Still have setup questions?

Message our engineers directly — we will tell you which 3 settings your site actually needs, help with LiteSpeed/WooCommerce, or configure everything turnkey.

Send a request on the site Reply within one business day · direct to engineers, no Tier-1 bots