Skip to content

EaDesgin/magento2-clean-media

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The module provides a command for retrieving information about catalog media and allows to remove unused images

Installation

Run the following commands from the project root directory:

composer require sivaschenko/magento2-clean-media
bin/magento module:enable Sivaschenko_CleanMedia
bin/magento setup:upgrade

Usage

Information about media

bin/magento si:catalog:media

Media Gallery entries: 17996.
Files in directory: 23717.
Cached images: 353597.
Unused files: 5847.
Missing files: 4.

List missing files

bin/magento si:catalog:media -m

Missing media files:
/i/m/image1.jpg
/i/m/image2.jpg
/i/m/image3.jpg
/i/m/image4.jpg
Media Gallery entries: 17996.
Files in directory: 23717.
Cached images: 353597.
Unused files: 5847.
Missing files: 4.

List unused files

bin/magento si:catalog:media -u

Unused files:
/i/m/image1.jpg
...
/i/m/image5847.jpg
Media Gallery entries: 17996.
Files in directory: 23717.
Cached images: 353597.
Unused files: 5847.
Missing files: 4.

Remove unused files

bin/magento si:catalog:media -r

About

Magento 2 media information and cleanup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%