Imsanity automatically resizes huge image uploads down to a size that is
more reasonable for display in browser, yet still more than large enough for typical website use.
The plugin is configurable with a max width, height and quality. When a contributor uploads an
image that is larger than the configured size, Imsanity will automatically scale it down to the
configured size and replace the original image.

Imsanity also provides a bulk-resize feature to selectively resize previously uploaded images
to free up disk space.

This plugin is ideal for blogs that do not require hi-resolution original images
to be stored and/or the contributors don’t want (or understand how) to scale images
before uploading.


  • Automatically scales large image uploads to a more “sane” size
  • Bulk-resize feature to selectively resize existing images
  • Allows configuration of max width/height and jpg quality
  • Optionally converts BMP files to JPG so image can be scaled
  • Option to convert PNG files to JPG format for higher compression
  • Once enabled, Imsanity requires no actions on the part of the user
  • Uses WordPress built-in image scaling functions


Imsanity is available in several languages, each of which will be downloaded automatically when you install the plugin. To help translate it into your language, visit


Imsanity is developed at (pull requests are welcome)


Originally written by Jason Hinkle (RIP). Maintained and developed by Shane Bishop with special thanks to my Lord and Savior.


  • Imsanity settings page to configure max height/width
  • Imsanity bulk image resize feature


Automatic Installation:

  1. Go to Admin -> Plugins -> Add New and search for “imsanity”
  2. Click the Install Button
  3. Click ‘Activate’

Manual Installation:

  1. Download
  2. Unzip and upload the ‘imsanity’ folder to your ‘/wp-content/plugins/’ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress


What is Imsanity?

Imsanity is a plugin that automatically resizes uploaded images that are larger than the configured max width/height

Will installing the Imsanity plugin alter existing images in my blog?

Activating Imsanity will not alter any existing images. Imsanity resizes images as they are uploaded so
it does not affect existing images unless you specifically use the “Bulk Image Resize” feature on
the Imsanity settings page. The “Bulk Image Resize” feature allows you to selectively resize existing images.

Why aren’t all of my images detected when I try to use the bulk resize feature?

Imsanity doesn’t search your file system to find large files, instead it looks at the “metadata”
in the WordPress media library database. To override this behavior, enable deep scanning.

Why am I getting an error saying that my “File is not an image” ?

WordPress uses the GD library to handle the image manipulation. GD can be installed and configured to support
various types of images. If GD is not configured to handle a particular image type then you will get
this message when you try to upload it. For more info see

How can I tell Imsanity to ignore a certain image so I can upload it without being resized?

You can re-name your file and add “-noresize” to the filename. For example if your file is named
“photo.jpg” you can rename it “photo-noresize.jpg” and Imsanity will ignore it, allowing you
to upload the full-sized image.

Optionally you can temporarily adjust the max image size settings and set them to a number that is
higher than the resolution of the image you wish to upload

Why would I need this plugin?

Photos taken on any modern camera and even most cellphones are too large for display full-size in a browser.
In the case of modern DSLR cameras, the image sizes are intended for high-quality printing and are ridiculously
over-sized for display on a web page.

Imsanity allows you to set a sanity limit so that all uploaded images will be constrained
to a reasonable size which is still more than large enough for the needs of a typical website.
Imsanity hooks into WordPress immediately after the image upload, but before WordPress processing
occurs. So WordPress behaves exactly the same in all ways, except it will be as if the contributor
had scaled their image to a reasonable size before uploading.

The size limit that imsanity uses is configurable. The default value is large enough to fill
the average vistors entire screen without scaling so it is still more than large enough for
typical usage.

Why would I NOT want to use this plugin?

You might not want to use Imsanity if you use WordPress as a stock art download
site, provide high-res images for print or use WordPress as a high-res photo
storage archive. If you are doing any of these things then most likely
you already have a good understanding of image resolution.

Doesn’t WordPress already automatically scale images?

When an image is uploaded WordPress keeps the original and, depending on the size of the original,
will create up to 4 smaller sized copies of the file (Large, Medium-Large, Medium, Thumbnail) which are intended
for embedding on your pages. Unless you have special photographic needs, the original usually sits
there unused, but taking up disk quota.

Why did you spell Insanity wrong?

Imsanity is short for “Image Sanity Limit”. A sanity limit is a term for limiting something down to
a size or value that is reasonable.

Where do I go for support?

Questions may be posted on the support forum at but if you don’t get an answer, please use


22 septimber, 2020
I have tried a number of image compression plugin, including those included in optimization plugins. This is the only one that I have found that doesn't destroy the image visually.
12 juny, 2020
I think everyone should have this plugin. Unless you are running a site for a photographer or need high-res images this plugin is perfect. Not only does it prevent your users uploading silly size images you can also scan and resize images already uploaded.
Read all 236 reviews

Contributors & Developers

“Imsanity” is open source software. The following people have contributed to this plugin.


“Imsanity” has been translated into 14 locales. Thank you to the translators for their contributions.

Translate “Imsanity” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • added: wp-cli command ‘wp help imsanity resize’
  • fixed: adding an image to a post in pre-draft status uses wrong settings/dimensions


  • added: imsanity_allowed_mimes filter to override the default list of image formats allowed
  • added: imsanity_orientation filter to modify auto-rotation behavior, return 1 to bypass
  • added: imsanity_get_max_width_height filter to customize max width/height
  • added: define network settings as defaults for new sites in multi-site mode
  • fixed: WP threshold of 2560 overrides Imsanity when using larger dimensions
  • fixed: settings link on plugins page broken in some cases
  • fixed: crop filter not applied if max width or height is equal to existing dimension
  • fixed: invalid capabilities used for settings page – props @cfoellmann


  • changed: default size from 2048 to 1920
  • fixed: WP Import plugin breaks during Media imports
  • fixed: setting a value to 0 causes errors on multi-site
  • fixed: conversion settings not displaying correctly on multi-site


  • changed: noresize in filename also works in batch processing
  • fixed: error message does not contain filename when file is missing
  • fixed: notice on network settings when deep scan option has not been set before


  • fixed: bulk resizer scan returning incorrect results
  • fixed: sprintf error during resizing and upload


  • added: deep scanning option for when attachment metadata isn’t updating properly
  • fixed: uploads from Gutenberg not detected properly
  • fixed: some other plugin(s) trying to muck with the Imsanity settings links and breaking things
  • fixed: undefined notice for query during ajax operation
  • fixed: stale metadata could prevent further resizing

Earlier versions

Please refer to the separate changelog.txt file.