Imsanity

Описание

Automatically resize huge image uploads with Imsanity. Choose whatever size and quality you like, and let Imsanity do the rest. 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 resize previously uploaded images and free up disk space. You may resize individual images from the Media Library’s List View.

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.

You may report security issues through our Patchstack Vulnerability Disclosure Program. The Patchstack team helps validate, triage and handle any security vulnerabilities. Report a security vulnerability.

Функционал

  • Automatically scales large image uploads to a more «sane» size
  • Bulk resize feature to resize existing images
  • Selectively resize images directly in the Media Library (List View)
  • Allows configuration of max width/height and JPG quality
  • Optionally converts BMP and PNG files to JPG for more savings
  • 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 https://translate.wordpress.org/projects/wp-plugins/imsanity

Contribute

Imsanity is developed at https://github.com/nosilver4u/imsanity (pull requests are welcome)

Credits

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

Установка

Автоматическая установка:

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

Ручная установка:

  1. Download imsanity.zip
  2. Unzip and upload the ‘imsanity’ folder to your ‘/wp-content/plugins/’ directory
  3. Активируйте плагин в разделе «Плагины» админки WordPress

Часто задаваемые вопросы

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 Resize feature allows you to quickly resize existing images.

Why am I getting an error saying that my «File is not an image» ?

WordPress использует библиотеку GD для обработки изображений. GD может быть установлен и настроен для поддержки различных типов изображений. Если GD не настроен для обработки определенного типа изображения, то вы получите это сообщение при попытке загрузить его. Для дополнительной информации обращайтесь на http://php.net/manual/ru/image.installation.php

Как я могу приказать Insanity игнорировать определенное изображение, чтобы иметь возможность загрузить его без изменения размера?

Вы можете переименовать файл добавив «-noresize» к его названию. Например, если ваш файл называется «photo.jpg» вы можете переименовать его на «photo-noresize.jpg» и Imsanity проигнорирует его, что позволит вам загружать полноразмерное изображение.

If you are a developer (or have one handy), you can also use the ‘imsanity_skip_image’ filter to bypass resizing for any image.

Does Imsanity compress or optimize my images?

While Imsanity does compress JPG images in the process of resizing them, it uses the standard WordPress compression. Thus, the resulting images are not efficiently encoded and can be optimized further (without quality loss) by the EWWW Image Optimizer and many other image optimization plugins.

Will Imsanity resize images from plugin X, Y, or Z?

If the images can be found in the Media Library of your site, then it is likely Imsanity will resize them. Imsanity uses the wp_handle_upload hook to process new uploads and can resize any existing images in the Media Library using the Bulk Resizer. If the images are not in the Media Library, you can use the EWWW Image Optimizer to resize them.

Зачем мне нужен данный плагин?

Photos taken on any modern camera and most cellphones are too large to display full-size in a browser.
This wastes space on your web server, and wastes bandwidth for your visitors to view these files.

Imsanity позволяет установить разумное ограничение, так что все загруженные изображения будут ограничены подходящим размером, более чем достаточным для нужд обычного веб-сайта. Обработка Imsanity стоит на очереди WordPress сразу после загрузки изображений, но перед тем как происходит обработка WordPress. Так что WordPress ведет себя точно так же во всех отношениях, за исключением того, что будет как-будто пользователь уменьшил размер изображения до разумного размера перед загрузкой.

Предельный размер используемый Imsanity настраивается. Размера по умолчанию хватит для того что-бы заполнить весь экран среднего посетителя без масштабирования, так что он будет вполне достаточен для типового использования.

Почему я НЕ хочу использовать этот плагин?

You might not want to use Imsanity if you use WordPress as a stock art download site, to provide hi-resolution images for print or use WordPress as a hi-resolution photo storage archive.

Doesn’t WordPress already automatically scale images?

Когда изображение загружено, WordPress сохраняет оригинал и, в зависимости от размера оригинала, создаёт до 4-х копий файлов меньшего размера (Большой, Средне-большой, Средний, Миниатюра), которые предназначены для размещения на страницах сайта. Если у вас нет специальных фотографических потребностей, оригинал обычно находится там не использованным, занимая при этом место.

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.

Куда обращаться за поддержкой?

Questions may be posted on the support forum at https://wordpress.org/support/plugin/imsanity but if you don’t get an answer, please use https://ewww.io/contact-us/.

Отзывы

25.03.2024
Idéal pour éviter aux utilisateurs de charger des photos trop lourdes, qui nuiraient à la vitesse de chargement du site. Plus besoin de rappeler sans arrêt aux clients que leurs fichiers médias doivent être optimisés en amont, le plugin règle une grande partie du problème sans qu'ils aient à s'en soucier 🙂
17.02.2024
This plugin provides what WordPress' own handling of big images should have been: scaling of huge uploads while uploading, preventing enormous storage consumption. And in addition to that, it can also fix WP's own shortcoming of leaving huge originals in place —in bulk, after the fact. A godsend. Thank you so much for making this plugin. (The icing on the cake would be if it automatically stripped the darn _scaled appendix from the filename in WP's resized images;-)
12.10.2023
WordPress is so bad with image handling. We really need this plugin to limit the size of bbPress attachment uploads, and remove the huge original files from the disk. It's an environmental issue too, we should not waste storage. Thanks for making this available. Is this functionality included in EWWW image optimizer too, or would you install both?
Посмотреть все 277 отзывов

Участники и разработчики

«Imsanity» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«Imsanity» переведён на 20 языков. Благодарим переводчиков за их работу.

Перевести «Imsanity» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

2.8.3

  • changed: use updated WP coding standards
  • fixed: PHP 8 error trying to do math with string values

2.8.2

  • fixed: mime type error when filename in attachment metadata is incorrect

2.8.1

  • changed: escape and sanitize more things
  • changed: tighten PHPCS rules used for pre-release testing

2.8.0

  • added: support for resizing WebP images via ImageMagick
  • changed: update attachment file size to keep WP 6.0 metadata in sync
  • changed: use original image for resizing if full size version was scaled by WordPress
  • fixed: JS scroller during bulk resize causes unexpected behavior

2.7.2

  • Исправлено: удаление оригиналов иногда могло инициировать удаление полноразмерной версии
  • Исправлено: ошибка обработки изображения, размер которого на 1 пиксель больше максимального размера.

2.7.1

  • Изменение: уточнение текста кнопки сброса очереди
  • Изменение: функция удаления оригиналов в массовом / выборочном изменении размера будет очищать метаданные, если исходное изображение уже исчезло.

2.7.0

  • Изменено: средство массового изменения размера изменит размер всех изображений без ограничений, для выборочного изменения размера используйте режим списка
  • added: see current dimensions and resize individual images in Media Library list mode
  • added: imsanity_disable_convert filter to bypass BMP/PNG to JPG conversion options conditionally
  • added: imsanity_skip_image filter to bypass resizing programmatically
  • added: ability to remove pre-scaled original image backup (in bulk or selectively)
  • changed: PNG images will not be converted if transparency is found
  • fixed: BMP files not converted when server uses image/x-ms-bmp as mime identifier
  • removed: Deep Scan option is the default behavior now, no need for configuration

Earlier versions

Please refer to the separate changelog.txt file.