cap/cleanmedia
最新稳定版本:2.0.0
Composer 安装命令:
composer require cap/cleanmedia
包简介
Magento 2 CLI Command : remove images of deleted product in the `/media/catalog/product` folder
README 文档
README
Magento 2 CLI Command : remove images of deleted product in the /media/catalog/product folder
based on EAV Cleaner Console Command from FireGento e. V. - Hackathons
Purpose of this module
- scan the
media/catalog/productfolder including/cache - find all images used by products in the db :
catalog_product_entity_media_gallery_value_to_entitytable givesvalue_idof images.
catalog_product_entity_media_gallerytable givesvalue(real path) - delete all files in the
media/catalog/productfolder NOT USED by any products. - delete related records in database.
Installation
Copy all files in /path/to/magento/app/code/Cap/CleanMedia
Run commands :
php/bin magento module:enable Cap_CleanMedia
php/bin magento setup:upgrade
Commands
php bin/magento cap:clean:media --help
php bin/magento cap:clean:media
php bin/magento cap:clean:media --dry-run
php bin/magento cap:clean:media --no-cache
php bin/magento cap:clean:media --dry-run --no-cache
统计信息
- 总下载量: 12.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-11-08