跳到内容

ForgeHub Image Memory Guard

v1.1.8

WPForgeHub · 2026年11月26日 上架

Proactive memory protection for media library. Pre-calculates image memory budgets, prevents fatal memory exhaustion, and enables safe auto-scaling.

正在使用
10 以下
评分
暂无
累计下载
0
最近更新
2026年11月26日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

截图

Image Memory Guard settings, live PHP memory diagnostics, and interactive memory budget calculator.
Image Memory Guard settings, live PHP memory diagnostics, and interactive memory budget calculator.

One of the most common and disruptive errors in WordPress is uploading a high-resolution photo only to encounter a generic “HTTP error” or fatal crash:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32000000 bytes)

When an image is uploaded, WordPress and GD / Imagick must decompress the full uncompressed raster into RAM to generate intermediate thumbnails (thumbnail, medium, large, etc.). A 15 MB photo can easily require over 180 MB of RAM during decompression!

Image Memory Guard prevents this catastrophic crash before it happens:

  • Pre-Flight Memory Budget Inspection: Inspects the binary headers of uploaded images (getimagesize) without allocating full canvas memory. Calculates exact memory requirement before processing begins.
  • Smart Auto-Downscaling: Gracefully resizes oversized images down to manageable master dimensions instead of crashing the PHP process.
  • Informative Human-Friendly Error Handling: If downscaling is disabled and an image exceeds server memory, gives the user an actionable warning instead of breaking the Media Library.
  • Dynamic Memory Elevation: Safely bumps wp_raise_memory_limit('image') during active image processing.
  • Interactive Admin Budget Calculator: Test any image resolution against your server memory in real-time.

Key Features (Free Version)

  • Pre-Upload Memory Verification: Protects against 500 and fatal memory exhaustion errors.
  • Automatic Master Downscaling: Keeps photos within server safe zones.
  • Live System Diagnostics: Monitor PHP memory limits, peak usage, and max safe resolutions.
  • Memory De-allocation: Calls garbage collection after thumbnail generation cycles.

Pro Features (Separate Commercial Plugin)

Need background processing or next-gen conversion? The separate commercial Pro edition is available at WPForgeHub and is not bundled in this free plugin:
* Background Chunked Resizing: Queue heavy resizing tasks in the background via Action Scheduler.
* WebP & AVIF Dual Engine: Auto-convert uploaded images to next-gen formats with CPU throttling.
* WP-CLI Library Audit: Scan entire media library via command line for memory-heavy attachments.
* EXIF Privacy Sanitizer: Strip location and camera metadata before decompression.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums