[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$frO6k4g2OUq7LFYfDH6lKNng804GDgT6iNO-1G6B0r6A":3},{"slug":4,"display_name":4,"profile_url":5,"plugin_count":6,"total_installs":7,"avg_security_score":8,"avg_patch_time_days":9,"trust_score":10,"computed_at":11,"plugins":12},"longchaoliu","https:\u002F\u002Fprofiles.wordpress.org\u002Flongchaoliu\u002F",1,60,85,30,84,"2026-04-05T07:41:34.430Z",[13],{"slug":14,"name":15,"version":16,"author":4,"author_profile":5,"description":17,"short_description":18,"active_installs":7,"downloaded":19,"rating":20,"num_ratings":21,"last_updated":22,"tested_up_to":23,"requires_at_least":24,"requires_php":25,"tags":26,"homepage":32,"download_link":33,"security_score":8,"vuln_count":34,"unpatched_count":34,"last_vuln_date":35,"fetched_at":36},"auto-smart-thumbnails","Auto Smart Thumbnails","1.1.4","\u003Ch4>I. Face detection\u003C\u002Fh4>\n\u003Cp>WordPress (WP) plugin\u002Fthemes 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.\u003C\u002Fp>\n\u003Ch4>II. Downsize images\u003C\u002Fh4>\n\u003Cp>There are many ways to backup\u002Fstore 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.\u003C\u002Fp>\n\u003Cp>Media files (pdf, movie and images) are usually the biggest storage eaters. Here are some practice tips related to images:\u003Cbr \u002F>\n1. Use jpg to store images. No png except for the logo images.\u003Cbr \u002F>\n2. Downsize your images to about (1920×1080, full high definition, FHD).\u003Cbr \u002F>\n3. Get rid of those unused thumbnails.\u003C\u002Fp>\n\u003Cp>AST helps you with 2 and 3. It helped to trim my website from 24G to 9G.\u003C\u002Fp>\n\u003Cp>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 (5184×3456) is downsized by 3 to (1728×1152) and its file size is down from 4.9M to 239K. Conventional tools may downsize it by 3.2 (=3456\u002F1080) to (1687×1080, short side exact FHD). Blurring happens because of the pixels fractioned.\u003C\u002Fp>\n\u003Cp>For images smaller than 3840×2160, 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%.)\u003C\u002Fp>\n\u003Ch4>III. Cleanup thumbnails\u003C\u002Fh4>\n\u003Cp>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.\u003C\u002Fp>\n\u003Ch3>Notes\u003C\u002Fh3>\n\u003Cp>AST is based on \u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fplugins\u002Foptimize-images-resizing\u002F\" rel=\"ugc\">‘Optimize images Resizing’ by OriginalEXE\u003C\u002Fa>, which seems to be dormant for years.\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmauricesvay\u002Fphp-facedetection\" rel=\"nofollow ugc\">Face detection algorithm is by Maurice Svay\u003C\u002Fa>. It returns only the first face candidate detected. For most of images it does the job well and and it’s a bit faster than another implementation \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffelixkoch\u002FPHP-FaceDetector\" rel=\"nofollow ugc\">PHP-FaceDetector by Felix Koch\u003C\u002Fa>. When it fails to detect face(s), the cropping will be done by the WordPress default.\u003C\u002Fp>\n\u003Cp>The module is designed to be \u003Cstrong>extendable\u003C\u002Fstrong>. Other plugins can do face detection, e.g. with faster algorithms or better accuracy, or can designate focal points manually, then store the face\u002Ffocal data to the meta data of an image. AST can pick up the data to do cropping. This is done by adding a new field ‘focal_area’ in the meta data, as below:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>Array (\n    [width] => 512\n    [height] => 512\n    [file] => 2019\u002F04\u002Fsample-image-file.jpg\n    [sizes] => Array ()\n    [focal_area] = (\n        [x] => 100\n        [y] => 123\n        [w] => 58\n        [h] => 58\n        [faces] => Array (\n            [tharavaad-svay] => Array (\n                [0] => Array (\n                    [x] => 100\n                    [y] => 123\n                    [w] => 58\n                )\n            )\n            [koch] => Array (\n                [0] => Array (\n                    [x] => 100\n                    [y] => 123\n                    [w] => 58\n                )\n                [1] => Array (\n                    ...\n                )\n            )\n        )\n    )\n)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The focal_area is defined by the position (x, y) and width and height. External plugins can store the detection result with these 4 parameters. AST can pick them up for cropping.\u003C\u002Fp>\n\u003Cp>The ‘focal_area’ can be non-face objects that users want to focus on. Within it, the optional ‘faces’ array defines faces detected and the algorithm used.\u003C\u002Fp>\n\u003Cp>To make it simple, some assumptions and numbers are defined as below:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\n\u003Cp>To resave png images in jpg will save a lot space. But it needs to mess up with the WP database, which I stayed away for now. You may want to \u003Ca href=\"https:\u002F\u002Fwww.xnview.com\u002Fen\u002Fxnviewmp\u002F\" rel=\"nofollow ugc\">convert your png images to jpg\u003C\u002Fa> before uploading them to your server.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>An image is downsized only when its short side > 2×1080. Otherwise it’s re-compressed when its size >128k bytes. The new jpg file replaces the original only when it’s 25k bytes smaller.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>When a downsizing happens, the original is saved in uploads\u002Fast-backup. The year\u002Fmonth structure is preserved. To save the server storage space, it’s recommended to download it and delete it from the server.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>I didn’t get time to handle the localization language files yet.\u003C\u002Fp>\n\u003Cp>Please let me know how it works for you, or any improvement suggestions or feedback. Thanks!\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Flongchaoliu\u002Fauto-smart-thumbnails\" rel=\"nofollow ugc\">Source code\u003C\u002Fa>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F8ekYwzv\" rel=\"nofollow ugc\">Discord forum\u003C\u002Fa>\u003C\u002Fp>\n","Plugin creates thumbnails on demand with face detection. Remove unused thumbnails and downsizes images. Free up server storage.",4759,86,6,"2022-03-02T22:24:00.000Z","5.9.13","3.8","7.0",[27,28,29,30,31],"cleanup-thumbnails","downsize-images","face-detection","free-up-server-storage","smart-thumbnails","","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fauto-smart-thumbnails.1.1.4.zip",0,null,"2026-03-15T15:16:48.613Z"]