
內容簡介
LC Smart Media Redirect & Cleaner 是一款專為優化媒體庫而設計的外掛,能有效避免前端圖片出現 404 錯誤,並自動重定向缺失或不匹配的縮圖請求,保持媒體庫的整潔與高效。
【主要功能】
• 智能重定向缺失縮圖請求
• 自動調整過大圖片尺寸
• 扫描孤立的元數據和未使用檔案
• 審核孤立檔案的修剪工具
• 實時伺服器 CPU 負載監控
• 互動式視覺質量與節省比較模態
外掛標籤
開發者團隊
② 後台搜尋「LC Smart Media Redirect & Cleaner」→ 直接安裝(推薦)
原文外掛簡介
LC Smart Media Redirect & Cleaner keeps your Media Library lean without ever breaking a front-end
image. It intelligently redirects missing/mismatched thumbnail-size requests to the closest
available size instead of letting them 404 or silently regenerate on every request, scans for
orphaned metadata and unused files, and gives you a safe, reviewable prune tool.
Features:
Adaptive CPU Load Throttling & Background Engine — Real-time server CPU load monitoring (get_server_cpu_load()) with dynamic batch pacing, cooling backoffs, and safe execution.
Smart Core Web Vitals (LCP) Booster & Hero Preload Engine — Automatically detects hero images, strips loading="lazy", injects fetchpriority="high" and decoding="async", and outputs high-priority in
Master Original Image Dimension Cap & Auto-Downscaler — Resizes oversized raw master camera/iPhone uploads in place (e.g. capped at 2560px or 2048px) to eliminate hosting bloat.
Native WP-CLI Command Suite — Comprehensive terminal management via wp smrc stats, wp smrc regen, wp smrc prune, and wp smrc redirect.
Interactive Visual Quality & Savings Comparison Modal — Apple-style split comparison slider with real-time file size & % savings calculations.
Smart Size Redirect — serves the closest matching registered image size instead of a
broken or oversized fallback.
Metadata Orphan Scanner — manual, batched scan for attachment metadata pointing at files
that no longer exist.
Prune Tool — review orphaned files before removing them; nothing is deleted blindly.
Future Generation Manager & custom image size management.
Background thumbnail regeneration via WP-Cron, batched to avoid timeouts.
App-like dashboard with single-site storage stats, export/import configuration.
Staging-to-Live Production Preset Sync — export complete configurations (core dimensions, size selections, Smart Size Redirect rules, and Pro engines) for seamless local-to-live migration.
Need automated (no-click) background maintenance, AVIF/WebP multi-format delivery, auto-compression, or
multisite/CDN-aware storage analysis? See LC Smart Media Redirect & Cleaner Pro, the licensed
add-on.
This plugin is the direct successor to “Batch Image Cleaner” (v1.9.28 and earlier); Standard
free features and stored settings remain fully compatible.
Current Active Pipeline Status
Standard lifecycle (v1.9.33, audited August 8, 2026): ✅ Bootstrap order, migration, activation/deactivation, cron ownership, uninstall cleanup, and legacy URL handling were traced end to end. Three defects were fixed: query-string false-positive 410 responses, stale deactivation orphan-scan state, and retained dynamic prune sessions after uninstall.
Future-upload size generation & Image Size Manager (v1.9.56, audited August 19, 2026): ✅ smrc_get_registered_sizes() updated to read unfiltered registrations directly from Smrc_Core::get_image_sizes(). Custom registration, override ordering, disabled-size filtering, minimum-longest-side behavior, duplicate-size deduplication, and post-upload metadata were traced end to end. All 26 registered sizes (Core, Theme, WooCommerce, Custom) reliably render on the Image Sizes grid regardless of active upload generation state.
Dashboard configuration controls (v1.9.35, audited August 8, 2026): ✅ Rendered controls, action bindings, nonces/capabilities, option persistence, import/export, and completion feedback were traced end to end. Two UI defects were fixed: numeric settings now acknowledge or safely roll back failures, and the unused scan-subfolder selector was removed.
Manual thumbnail regeneration (v1.9.36, audited August 8, 2026): ✅ Selected-size persistence, reset/resume/run loop, locks, attachment processing, file/metadata writes, errors, stop, and recovery controls were traced end to end. Two defects were fixed: Stop no longer releases the lock during an active batch, and the live error total includes every batch error.
Background thumbnail regeneration (v1.9.37, audited August 8, 2026): ✅ AJAX start/status/cancel, cron scheduling, run state, locks, batch processing, completion, stale recovery, and UI feedback were traced end to end. Four concurrency/recovery defects were fixed: duplicate starts and callbacks are blocked, cancellation cannot be overwritten by an in-flight batch, and malformed running state recovers safely.
Background orphan scanner (v1.9.38, audited August 8, 2026): ✅ Start/status/cancel/clear AJAX, WP-Cron scheduling, persistent offsets/results, filesystem and metadata phases, result caps, cancellation, stale recovery, and UI polling were traced end to end. Four concurrency/recovery defects were fixed: duplicate starts and cron callbacks are blocked, cancellation cannot be overwritten by in-flight work, malformed state recovers to idle, and structured UI failures are handled correctly.
Cleanup and prune execution (v1.9.39, audited August 8, 2026): ✅ Analysis safety set, prune preparation, transient ownership, batched deletion, per-file path handling, orphan metadata/file deletion, and client completion feedback were traced end to end. Two safety defects were fixed: every batch revalidates its reviewed filesystem scope, and the UI only confirms deletion after a successful server response.
Rebrand compatibility (v1.9.40, audited August 8, 2026): ✅ Standard bootstrap, class/function identity, shared cron hooks/state, Pro dependency contract, and exported UI metadata were traced end to end. Runtime and exported metadata now use the Smart Media name; retained bic_* keys are data compatibility identifiers, not executable class/function names.
Active runtime boundary (v1.9.41, audited August 8, 2026): ✅ Configuration import validation now accepts only Smart Media exports. The retired Batch Image Cleaner is not used as a runtime or import dependency; retained bic_* values remain stored-data compatibility only.
Deletion and regeneration safety (v1.9.42, audited August 8, 2026): ✅ Folder deletion, thumbnail-size deletion, metadata-derived file paths, foreground size selection, and lifecycle cleanup were rechecked. Four defects were fixed: unsafe deletion inputs are rejected, failed deletes retain metadata, folder traversal refuses symlinks/out-of-scope entries, and regeneration processes only active image sizes.
Third-pass deletion revalidation and state hardening (v1.9.44, audited August 8, 2026): ✅ Orphan deletion (metadata + files), regeneration lock lifecycle, prune lock recovery, custom-size deletion, size-override read paths, configuration import validation, and uninstall coverage of lock options and dynamic scan-accumulator transients.
Smart Size Redirect (Standard, v1.9.55, audited August 18, 2026): ✅ Dynamic canonical discovery, aspect-ratio/crop-mode compatibility scoring, manual destination overrides, auto-match reset, and frontend image_downsize/srcset behavior were traced end to end.
Fourth-pass deep audit (Standard + Pro, audited August 10, 2026): ✅ Thumbnail Regeneration, Future Generation & Custom Sizes, Storage Overview & Config Backup, Pro License Engine, Pro WebP Pipeline, Pro Auto-Compression Pipeline, Pro Automated Maintenance, and Pro Multisite & CDN Storage Analysis were thoroughly reviewed end to end. Validated correctness, state transitions, fail-closed safety checks, and edge-cases. Found no regressions or new bugs. The fixes applied in previous passes successfully resolved all prior defects in these pipelines.
