Linux 软件免费装

Auto Smart Thumbnails

开发者 longchaoliu
更新时间 2022年3月3日 06:24
捐献地址: 去捐款
PHP版本: 7.0 及以上
WordPress版本: 5.9
版权: GPLv3
版权网址: 版权信息

标签

smart thumbnails downsize images cleanup thumbnails free up server storage face detection smart crop

下载

1.1.1 1.1.2 1.1.3 1.1.0 1.1.4

详情介绍:

I. Face detection WordPress (WP) plugin/themes crop images per fixed position {top, center, bottom} x {left, center, right}. This often generates thumbnails with faces being cut out. This plugin (Auto Smart Thumbnails, AST) employs face detection to keep the face in the center of cropped images. II. Downsize images There are many ways to backup/store your images. Your web server host is the last option for that though (too expensive). Essentially, your web server serves one purpose and one purpose only: a lean fast website. So making it small and agile is critical in both user experience and website maintenance. Media files (pdf, movie and images) are usually the biggest storage eaters. Here are some practice tips related to images:
  1. Use jpg to store images. No png except for the logo images.
  2. Downsize your images to about (1920x1080, full high definition, FHD).
  3. Get rid of those unused thumbnails. AST helps you with 2 and 3. It helped to trim my website from 24G to 9G.
AST downsizes big images in a smart way. It does so by a factor of an integer, e.g. 2, 3, 4 etc, so that the result image looks as crisp as the original on a webpage, e.g. an image of (5184x3456) is downsized by 3 to (1728x1152) and its file size is down from 4.9M to 239K. Conventional tools may downsize it by 3.2 (=3456/1080) to (1687x1080, short side exact FHD). Blurring happens because of the pixels fractioned. For images smaller than 3840x2160, which can't even be downsized by a factor of 2, they will be compressed (at WP default quality of 82%. Though the document says the default quality is 90%, in code it's 82%.) III. Cleanup thumbnails Some WP themes generate many, sometimes 10s of, custom sized thumbnails when an image is uploaded. These thumbnails may never be used yet take up your precious server storage space. AST helps remove these unused thumbnails and stop them from being generated when an image is uploaded. But a thumbnail will be generated and generated only when it is requested. The newly generated thumbnail is then stored for later use.

安装:

In WP 'Add Plugins', seach for 'auto-smart-thumbnails' and 'Install Now', and activate it.

屏幕截图:

  • Thumbnails generated by WP default. Faces cut.
  • Thumbnails generated by AST plugin. Faces detected and preserved.
  • Thumbnails generated by SmartCrop plugin. Faces cut.
  • Admin UI added by the plugin.
  • Log page after a cleanup.
  • Thumbnails before cleanup.
  • Thumbnails after cleanup.

升级注意事项:

none

更新日志:

1.1.4
  1. Fixed a crash with is_resource in PHP 8. PHP doesn't return resoure, changed to object.
  2. Tested up to WordPress 5.9.
1.1.3
  1. Save debug log file for remote debugging.
  2. Tested up to WordPress 5.7.
1.1.2
  1. Add debug log file for remote debugging.
  2. Tested up to WordPress 5.4.
1.1.1
  1. Test up to WorePress 5.3.2.
  2. Correct readme typos and wording.
1.1.0
  1. Add face detection.
  2. Add debug info log for troubleshooting.
1.0.0 Initial version. Based on 'Optimize Images Resizing' by OriginalEXE. Major issues fixed:
  1. During pagination, WP_Query returns corrupted result (duplicate and missing post IDs).
  2. Nothing happends when button 'Start new cleanup' is clicked.
  3. Sizes in meta data and thumbnail files out of sync.