Giter Club home page Giter Club logo

mage2unusedimageremover's Introduction

Magento2 Delete Unused Product Images

Command Line module to validate database images and remove from pub/media/catalog/product those JPG or PNG's which are not present in the database.

Installation

The preferred way to install this extension is through composer.

Add the following to your Magento2 composer.json repositories section:-

"repositories": [
   {
     "type": "vcs",
     "url": "https://github.com/cannycookie/Mage2UnusedImageRemover"
   }
 ],

Then run

composer require ekouk/imagecleaner "dev-master"

or add

"ekouk/imagecleaner": "dev-master"

to the require section of your composer.json file and run composer install

Once the files have been installed to vendor/ekouk/imagecleaner

Enable the module:-

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Usage

Run in check only mode which will report the number and size in Mb of unused images

bin/magento ekouk:cleanimages

Run and delete images

bin/magento ekouk:cleanimages -d

Notes

This module will only remove jpg, png, jpeg images from pub/media/catalog/product which are not referenced in the database. The default function without any switches will just report on unused files and NOT delete anything You must use the -d switch to remove files.

This module is provided free of charge with no warranty.

Please ensure you have a backup copy of your pub/media/catalog directory just in case anything does go wrong.

Support

If you need any help please log a ticket at http://support.ekouk.com

mage2unusedimageremover's People

Contributors

cannycookie avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.