osCmax v2.5 User Manual
Results 1 to 5 of 5

Remove Unused Images

This is a discussion on Remove Unused Images within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Scenario: I have 9000 image files. 2400 of them are not being used. How to find them and remove them ...

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Post Remove Unused Images

    Scenario: I have 9000 image files. 2400 of them are not being used.
    How to find them and remove them quickly and safely

    What this script does:
    * Read the database and report back a list of installed images
    * Mark (in RED) any DB listed image which does not exist on the server
    * Read the server images and report back a list
    * Compare the lists for missing data
    * Offer you the ability to check or uncheck listed images controlling what gets renamed
    * Rename the USER checked listed images from myimage.jpg to UNUSED_myimage.jpg
    * Allow you to ftp and delete ALL renamed UNUSED_myimage.jpg images

    More...
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    New Member
    Join Date
    May 2007
    Posts
    12
    Rep Power
    0


    Default Re: Remove Unused Images

    If I delete a product does it delete the image associated with that product ?

    Also looking at my images directory not all the images arte stored there, what other directories hold images ?
    Thanks

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Remove Unused Images

    1. No. It does not do that (delete images when you delete products).

    2. That is where images are stored by default (/images). If you are storing images elsewhere, you should know where that is, since you had to customize the settings to get osCommerce to store them in other locations.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    New Member
    Join Date
    May 2007
    Posts
    12
    Rep Power
    0


    Default Re: Remove Unused Images

    Someone else setup the site, any way to determine how to find the other image directories ?
    Your company hosts the sites so can you guys figure where ?
    Thanks

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Remove Unused Images

    You could use several methods to find images. You can use the Cpanel Disk Usage utility that shows what files and where. Login to your cpanel account to use this.

    You could use a command line search via ssh:

    Code:
    find . -type f -name "*.jpg" | xargs ls -l
    
    find . -type f -name "*.gif" | xargs ls -l
    Those will ouput all image and their paths for you, so you can see where every image is on your account.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. How To Remove Other Images For This Product Box?
    By m82492 in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 09-23-2008, 02:10 PM
  2. Remove Default Images
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-04-2007, 07:14 AM
  3. Add/Remove images from "New Products"
    By Mats_H in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 05-06-2006, 09:11 AM
  4. Remove "add to cart" function from images in produ
    By adam71o in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 01-26-2006, 04:48 PM
  5. Remove Product Images from server
    By chitta_rn in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 12-25-2005, 09:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •