Try the Demo

Magento Forum

   
Install ImageClean extension
 
MikeDeveloper
Jr. Member
 
Total Posts:  1
Joined:  2013-03-05
 

Hi,

I\’m new in magento.
I want to install magento extension - ImageClean.
1 - I would like to know in what folder i install the extension.
2 - What do i do after i install the module?
3 - How do i set a cron job to the ImageClean?

Thanks.

 Signature 

http://www.high-business.com/
http://www.high-business.com/business-loans-6
http://www.high-business.com/business-management-1
http://www.high-business.com/start-business-1
http://www.high-business.com/business-marketing-1
http://www.high-business.com/business-management-software-1
http://www.high-business.com/business-plan-1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Monty22
Guru
 
Avatar
Total Posts:  645
Joined:  2013-01-01
 

Hi,

Image Clean is an extension that lists all the product images found within the ‘media/catalog/product’ directory that are not found in your Magento database. The extension is designed to save you manually trawling though your image store folder looking for the relevant images to delete. It simply does the hard work for you by allowing you to select and delete those redundant images!

This guide will walk you through the installation of the Image Clean extension.

Before we start, as always we recommend backing up your Magento store before installing any extension.
Step 1: Login to your Magento Store Admin Panel.
Step 2: Browse to ‘System’ --> ‘Magento Connect’ --> ‘Magento Connect Manager’.
Step 3: Re-enter your Administrator credentials if prompted and click ‘Login’.
Step 4: Paste in the following extension key into the text box: ‘magento-community/Mage_Imaclean-0.1.0’

See Attachment- Step 4

Step 5: Click ‘Install’.
Step 6: You should see the following message which confirms the correct installation of Image Clean:

install okchannel://connect.magentocommerce.com/community/Mage_Imaclean-0.1.0

Step 7: Click the ‘Refresh’ button to verify the installation of Image Clean.

See Attachment --Step 7

Step 8: To use the Image Clean extension click ‘Return to Admin’, and you should see a new entry in your top navigation bar called ‘Imaclean’. Simply click ‘Imaclean’ --> ‘Manage Items’ and then click ‘Refresh’ to display a list of all the redundant images that can be deleted.

See Attachment --Step 8

If you need any kind of help you can contact us as we are one of best Magento extensions developer.

Thanks

Monty
iLoveMage

Get 25% discount all our Magento Extensions.

Image Attachments
Step 4.PNGStep 7.PNGStep 8.PNG
 Signature 

Get 15% discount on all our extensions Use code MON15 | Risk-free purchase with our 14 days Money Back Guarantee policy!

 
Magento Community Magento Community
Magento Community
Magento Community
 
GoMageTeam
Sr. Member
 
Avatar
Total Posts:  151
Joined:  2013-01-13
Warsaw, Poland
 

Hello,

At first you need to create imaclean.php file in the root Magento directory and write the following code there:

<?php
    
require_once "app/Mage.php";
    
umask (0);
    
Mage :: app("admin");

    
Mage::helper('imaclean')->compareList();
    
$collection Mage::getModel('imaclean/imaclean')->getCollection();

    foreach (
$collection as $image)
    
{
        
try {
            unlink(
'media/catalog/product'$image->getFilename());
            
$image->delete();
        
catch (Exception $e{
            Mage
::log($e->getMessage(),null,'imaclean.log');
        
}
    }
?>

After this action you should run the command in the console:

sudo crontab –e

And then you should write there:

0 0 * * * /usr/bin/php /full/path/to/imaclean.php

It will set up cron at 00 hours 00 minutes per every day, the other words the clearing of the images will be started at midnight.
Here is an important remark:
If you have many products, it will not work, it will be hanging.

 Signature 

Bronze Partner of Magento
• A high-leveled development company – Providing easy, comfortable and useful Magento extensions
• The supporters of qualified and fast service. Find out more here: http://www.gomage.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1676
Joined:  2009-06-04
 

@gomage - Can you modify that script so it skips over the placeholder images?

Otherwise, thank you for a really nice way to automate some housekeeping that Magento should have had built in from the beginning!

 Signature 

-----
1) For preserving thy future happiness, thou shalt back up thy HTTP doc directories and Magento database regularly.
2) For preserving thy sanity during module installs and moves, thou shalt disable thy cache and compiler and flush their caches.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top