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.

Функционал

  • 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/.

Отзывы

28.10.2022
Thank you so much for your awesome plugin. Creating a photography website I was able to optimize exactly as I wanted the 300 hi-res posted photos. The goal was to don't have a too printable quality but a sufficient one for a screen preview. I first made some tests on two images in the Media Library list view, changing the size and compression quality in the plugin settings until I found the good settings. With my final settings (max height 800 and a compression of 75 in my case) the weight of each image became 10 times lighter (the original jpeg were having a height of 1200 and were created from raws files directly in Lightroom and without jpeg compression). I also had some 1:1 and 2:3 ratios images to deal with... Although the plugin has no option to apply peculiar settings depending on a picture ratio (couldn't it be a future feature?) I chose to apply the same setting for both ratios, asking the plugin to resize images to have the same height of 800. To do this I just had to put 800 in the height input and 0 (zero) in the width one. Congratulations for your great work again!
22.07.2022
Extension Imsanity installée sur tous les sites que j'utilise
Посмотреть 271 отзыв

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

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

Участники

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

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

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

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

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

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.