purplespider/silverstripe-clearer-thumbnails
最新稳定版本:1.0.3
Composer 安装命令:
composer require purplespider/silverstripe-clearer-thumbnails
包简介
Makes CMS and UploadField thumbnails clearer
README 文档
README
This module fixes an issue in Silverstripe 4, 5 and 6 which results in particularly tall or wide images having pixelated/blurry thumbnails in the CMS, particularly for UploadFields.
Before:
After:
It also increases the size of thumbnail images to ensure they remain crips on HiDPI/Retina displays.
Installation
- Install module via composer:
composer require purplespider/silverstripe-clearer-thumbnails "1.*"
- Perform a flush:
https://www.example.com?flush=1
- For Silverstripe 4: For sites with existing assets, run the generate-cms-thumbnails task to re-generate the thumbnails for the Files tab (otherwise no thumbnails will appear).
php vendor/silverstripe/framework/cli-script.php dev/tasks/MigrateFileTask only=generate-cms-thumbnails
Silverstripe 5 doesn't provide the MigrateFileTask anymore.
What exactly does this do?
It simply overrides some settings via a config file to:
- Change
ThumbnailGenerator$methodfromFitMaxtoFillwhich avoids thumbnails being generated too small and then stretched. - Doubles the
UploadField$thumbnail_widthand$thumbnail_heightfrom60to120to ensure thumbnails are crisp on HiDPI/Retina displays. - Increases the
Image$asset_preview_widthand$asset_preview_heightto ensure image previews in the Files area are crisp on HiDPI/Retina displays.
Notes/Tips
- On sites with lots of images, the migration task is a resource intensive process which can take a while. Use
cpulimitto limit the effect it has on the site, e.g.cpulimit -p 1234 -l 50 - Possible issue with assets in a symlinked location not getting updated via the migration task, suggest temporarily replacing the symlink with the assets dir before running the task if you experience this.
统计信息
- 总下载量: 2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2021-08-06

