MITS Image Optimizer

Mô tả

MITS Image Optimizer is a professional image optimization toolkit for WordPress. It compresses images automatically on upload, batch-converts your entire media library to WebP and AVIF, configures Apache to serve next-gen formats automatically, and scans your site for common technical SEO issues.

Features

Auto-Compress on Upload
Every JPG/PNG above a configurable size threshold is automatically scaled and compressed before WordPress generates its thumbnail sizes. No extra steps needed.

Bulk Compression
Run a background batch job to compress all existing images in your media library. Progress is tracked and the job runs asynchronously — it won’t block your browser.

WebP Converter
Batch-convert all JPG/PNG/GIF files in your uploads directory to WebP format. Runs in the background using WP-Cron or a loopback HTTP request. Supports both Imagick and GD libraries.

AVIF Converter
Convert images to AVIF — the next-generation format that can be 30–50% smaller than WebP. Requires Imagick 7+ with AVIF support or PHP 8.1+ with GD imageavif(). The plugin detects support automatically and warns you if AVIF is unavailable on your server.

Apache .htaccess Configuration
One click adds mod_rewrite rules to your .htaccess so Apache automatically serves .webp files to browsers that support them, with no code changes required in your theme.

Image Dimensions Scanner
Detects images ≥ 1600 px wide that are used in posts or as featured images. Helps you find oversized images that slow down page loads, along with their file sizes, dimensions, and WebP/AVIF conversion status.

Site Audit
Scans your site for the most common technical issues: missing alt text, oversized images, missing SSL, outdated plugins, pages without Open Graph tags, and more. Results include actionable recommendations.

Dashboard Widget
A compact stats panel on the WordPress admin dashboard showing compression savings, WebP/AVIF conversion counts, and a link to the optimizer.

Requirements

  • PHP 8.0+, WordPress 6.0+
  • GD or Imagick PHP extension (for WebP/compression)
  • Imagick 7+ with AVIF or PHP 8.1+ GD (for AVIF conversion)
  • Apache + mod_rewrite (for automatic WebP serving via .htaccess)

Privacy

This plugin does not collect any personal data and does not make any external HTTP requests.

Ảnh màn hình

  • Main dashboard — image health score, library stats, and optimization overview.
  • WebP Converter tab — batch conversion controls, server library status, and progress tracking.
  • Site Audit tab — one-click free scan for performance, SEO, and security issues.

Cài đặt

  1. Upload the mits-image-optimizer folder to /wp-content/plugins/.
  2. Activate the plugin via Plugins Installed Plugins.
  3. Navigate to MITS Optimizer in the WordPress admin sidebar.
  4. (Optional) Click Konfiguruj .htaccess on the WebP tab to enable automatic browser-side WebP delivery.

Hỏi đáp

Does this plugin delete my original images?

No. Original images are never deleted. WebP and AVIF files are saved alongside originals with a .webp or .avif extension (e.g. photo.jpg photo.jpg.webp).

What happens if my server doesn’t support AVIF?

The AVIF tab will display a warning with the reason (e.g. Imagick version too old, or GD imageavif() not available). WebP conversion and compression still work independently of AVIF support.

Does it work with object-cache or page-cache plugins?

Yes. The plugin only modifies image files in your uploads directory and your .htaccess. It is compatible with all major caching plugins.

Can I run compression and WebP/AVIF conversion at the same time?

It is not recommended. Run one batch job at a time to avoid server load spikes and to keep progress tracking accurate.

Is the .htaccess change reversible?

Yes. The plugin wraps its rules in clearly marked comment blocks (# BEGIN MITS WebP# END MITS WebP). You can remove them manually or via the plugin button.

What image formats are supported?

Auto-compression and bulk compression support JPG, JPEG, PNG, and GIF. WebP and AVIF conversion support the same formats. GIF files are converted to static WebP/AVIF (animation is not preserved).

Đánh giá

28 Tháng 5, 2026
Does exactly what it promises. Auto-compression on upload works out of the box, WebP batch conversion runs smoothly in the background without blocking the browser, and the .htaccess configuration for automatic WebP serving is a one-click setup. The Image Dimensions Scanner is a nice bonus for catching oversized images before they become a performance problem.
Đọc tất cả 0 đánh giá

Người đóng góp & Lập trình viên

“MITS Image Optimizer” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

Nhật ký thay đổi

1.2.12

  • Fix: ajax_import_settings now checks actual .htaccess file state (htaccess_is_active) instead of DB value when deciding whether to remove rules — previously if DB already said false but file still had rules, removal was skipped.
  • Improve: conflict banner on settings page now has a one-click “⚡ Zastosuj zalecane ustawienia” button — no need to scroll to the import section.
  • Improve: after applying settings, conflicts list updates inline without page reload — form fields, top banner and inline list all update in place.
  • Improve: “Wygeneruj i zastosuj” can be triggered directly from the conflict banner button (generates recommended + applies in one click).

1.2.11

  • Fix: mits_import_settings and mits_recommended_settings were missing from the AJAX registration array — WordPress returned 0 for both actions causing “Błąd.” / “Błąd zapisu.” errors.

1.2.10

  • Add: Competing plugin detection in conflict checker — warns when WebP Converter for Media, ShortPixel, Smush, Imagify, EWWW, Optimole, TinyPNG or other optimization plugins are active alongside MITS.
  • Add: WP Super Cache + PHP WebP Serving conflict detection — warns about cache serving wrong format to non-WebP browsers.
  • Add: Autoptimize + PHP WebP Serving conflict hint.
  • Add: Import settings — new card on settings page with “Wygeneruj zalecane” button (picks optimal config for detected server: .htaccess for Apache/LiteSpeed, PHP WebP Serving for Nginx) and “Zastosuj” to apply JSON.
  • Add: mits_recommended_settings and mits_import_settings AJAX endpoints.
  • Add: After import, post-apply conflicts are shown inline without full page reload; page refreshes after 1.4s.

1.2.9

  • Add: Server detection (Apache / LiteSpeed / Nginx) — settings page now shows “Twój serwer” badge on the relevant section, disables .htaccess controls on Nginx with an explanatory banner, and highlights the Nginx config block.
  • Add: Settings conflict detection — plugin detects and displays warnings for conflicting configurations (e.g. .htaccess enabled on Nginx, double WebP serving, setting enabled but no .webp files exist).
  • Add: Conflicts section in settings page — shown as an orange banner above settings cards whenever conflicts are detected.
  • Add: Extended JSON debug export — now includes server info, Imagick format capabilities (WebP/AVIF read/write), disk free space, active plugins list, memory usage, PHP SAPI, WP_DEBUG state, locale, timezone, and conflict list.
  • Improve: Dashboard suggestions and score now server-aware — on Nginx, suggestions point to PHP WebP Serving / srcset instead of .htaccess; php_webp_serving counts toward webp_served score.
  • Improve: Audit no longer flags missing .htaccess on Nginx when PHP WebP Serving or srcset is active.
  • Improve: server type passed to JavaScript via mitsOptData.server for future JS-side hints.

1.2.8

  • Fix: .htaccess toggle button now keeps the database setting in sync with the actual .htaccess file state — previously toggling via the UI button could leave htaccess_webp option out of sync with reality.

1.2.7

  • Add: JSON export / debug button on Settings page — downloads a full status snapshot: plugin version, system info (PHP, GD, Imagick, memory), all settings, compression/WebP/AVIF/lossless stats, and last dashboard scan results.
  • Fix: Settings and About pages now inherit the full-width dark background layout matching the main optimizer page.

1.2.6

  • Fix: Settings page (?page=mits-settings) now renders a clean standalone view — plugin header + settings panels only, no tab navigation. Settings is only accessible from the WordPress sidebar menu.
  • Remove: Settings tab and panel removed from the main tabbed interface.

1.2.5

  • Fix: visiting ?page=mits-settings or ?page=mits-about now redirects to the main plugin page with the correct tab pre-selected, instead of rendering the full interface again from scratch.

1.2.4

  • Fix: “Ustawienia” tab added to the main navigation bar — visiting ?page=mits-settings now correctly opens the settings panel instead of showing the dashboard. .htaccess and compression controls are now always reachable via the tab.

1.2.3

  • Fix: dashboard suggestion buttons for “.htaccess” and “Settings” now navigate correctly to the Settings submenu page instead of silently failing (the settings panel is a separate WP admin page, not a tab).

1.2.2

  • Fix: JPEG WebP scanner now finds ALL JPEG attachments, including those that already have a .webp sidecar (created by bulk WebP Converter). Previously these were skipped, showing “no files found” on sites where WebP Converter had already run.
  • Improvement: JPEG WebP conversion reuses an existing .webp sidecar file instead of re-encoding, then removes the original JPEG and updates WordPress metadata. Column in results table shows current WebP size alongside JPEG size.

1.2.1

  • Fix: .htaccess block now includes AVIF serving rules before WebP — browsers receive .avif when the file exists, falling back to .webp then original. Existing installations with .htaccess active are updated automatically on next save.
  • Fix: PHP WebP Serving now also activates for browsers that send image/avif in the Accept header; AVIF is preferred over WebP when both exist.
  • Fix: WebP/AVIF srcset filters (WebP in srcset + PHP Serving) now prefer AVIF over WebP when the browser accepts it.
  • Fix: image scanner (bulk compress, WebP/AVIF scan) no longer skips files in directories with unreadable subdirectories; uses CATCH_GET_CHILD to continue past permission errors instead of aborting silently.
  • Fix: removed false-negative check in scan_images that could exclude .jpg files in edge-case directory structures.
  • Improvement: Nginx configuration snippet updated — dual map variables for AVIF and WebP with try_files fallback chain.

1.2.0

  • Add: JPEG WebP converter in the PNG JPG tab — scans all JPEG attachments without a .webp counterpart, converts each one and replaces the original, updates WordPress metadata, thumbnails, and all content URLs.
  • Change: PNG scan now finds all PNG files regardless of size (previously filtered to ≥ 150 KB).

1.1.0

  • Add: PNG backup restore — lists saved backup ZIPs, one-click restore extracts original PNGs, reverts WordPress metadata, content URLs, and removes .webp files.
  • Fix: PNG WebP table no longer clips the action button — removed conflicting overflow:hidden from card.
  • Fix: Admin notices from other plugins (AccessiYes, Rank Math, etc.) are now suppressed on all MITS pages.

1.0.9

  • Fix: PNG WebP conversion now handles the case where a .webp file already exists (created by WebP Converter) — instead of blocking with “file exists”, it skips re-encoding and proceeds to delete the PNG source and update WordPress metadata.

1.0.8

  • Add: PHP WebP Serving — replaces image URLs in HTML output with .webp versions when the browser supports WebP and the .webp file exists. Works on Apache and Nginx without any server configuration. Sends Vary: Accept header for correct caching behaviour. Off by default.

1.0.7

  • Add: “Pobierz ZIP (backup)” button on PNG JPG/WebP tab — creates a ZIP archive of all found PNG originals for safe local backup before conversion.
  • Change: “Konwertuj wszystkie” now automatically creates a backup ZIP before starting batch conversion; conversion is blocked if backup fails.

1.0.6

  • Add: “Konwertuj wszystkie” bulk button on the PNG JPG/WebP tab — converts all found PNG files in one click without losing the per-file option.

1.0.5

  • Add: Nginx WebP serving configuration snippet in Settings (alongside Apache .htaccess).
  • Change: .htaccess and Nginx sections moved into the Settings page; removed separate .htaccess tab.
  • Change: Settings and O MITS moved to WordPress sidebar submenu for easier access.

1.0.4

  • Add: Welcome notice shown after plugin activation with 3-step quick-start guide and a dismiss button.

1.0.3

  • Fix: Dashboard scan no longer scans the filesystem — uses WordPress database queries instead, making it instant even on stores with 100k+ products.
  • Fix: WebP/AVIF coverage is now estimated from a 500-attachment sample (extrapolated to full library) rather than iterating all files.

1.0.2

  • Add: “Settings” quick-link on the Plugins list page.
  • Fix: Missing logo-mits.svg causing 404 in the admin header.

1.0.1

  • Fix: AJAX handlers now return proper JSON error responses instead of HTTP 500 HTML on unexpected PHP errors.
  • Add: Built-in error logger — errors are saved to a log file in the uploads directory for easier debugging.
  • Add: Hidden diagnostic page at wp-admin/admin.php?page=mits-debug showing system info (PHP, GD, Imagick, upload directory permissions, WP-Cron status) and the error log with a clear button.

1.0.0

  • Initial release.
  • Auto-compression on upload with configurable quality and max-width.
  • Bulk compression with background batch processing and progress tracking.
  • WebP Converter with Imagick and GD support.
  • AVIF Converter with Imagick 7+ and GD imageavif() support.
  • Apache .htaccess automatic WebP serving configuration.
  • Image Dimensions Scanner detecting oversized images in use.
  • Site Audit with checks for missing alt, SSL, Open Graph, plugin updates, and more.
  • WordPress Dashboard Widget with optimization statistics.