Child pages
  • Automatic Images Folder Cleaning
Skip to end of metadata
Go to start of metadata

Imported From:

In-Portal stores images in 3 types : online, pending and resized ones. 

For many reasons, some pending images are not deleted by In-portal (one of my customers has 8213 pending images using 483Mo), and some online images aren't removed when the product is deleted from catalog. 

These non-deleted images lead to bigger folder size, increasing the backup sizes unnecessarily and creating confusion for users, which have images with "_a" at the end of the name, whereas apparently no product has the same image name (because an image from an old product still exists in image folder).

I suggest to write a short script achieving the following functions:

  • cleaning pending folder once a day when nobody is editing a product
  • comparing images table and images in folder, if an image isn't listed in DB, delete it from folder

This is a small improvement, but this way In-Portal manages really all files and keeps installation in a good state anytime.

Related Tasks

INP-139 - Getting issue details... STATUS


  1. Hello Phil,

    Yes, this sounds like a good idea and would be good to have.

  2. Sounds like a must have script. You can attach it to your next post and I'll
    try to create an agent, that will call it as Dima suggested. I also propose
    to delete all images from "/system/images/resized" (former
    "/kernel/images/resized") and "/system/images/pending/resized" (former
    "/kernel/images/pending/resized") folders completely from time to time (once
    a week or can be configured based on how often images are changed), because
    they will be recreated anyway, when someone accesses product/link that uses

    Also any other ideas about how to improve In-Portal will be greatly

  3. This has been converted to task In-Portal Tracker --

    INP-139 - Getting issue details... STATUS


  4. This has been implemented in In-Portal 5.0.1 and will be available in
    Beta shortly next week.

    For those of you who is eager to test it before next week - can do SVN
    checkout from


  5. Hi mates,

    it's could be really usefull to create an agent to remove "incomplete"
    orders older than xx days. The same should be used for Visitors, and
    even disabling visitors tracking could be fine, as 99% of my customers
    are using Google analytics.

  6. Hello Phil,

    This issue with duplicated Incomplete Orders has been fixed in 5.0.1 and
    will be available in Beta to review. No need to have separate Agent for



    Best Regards,

    Dmitry V. Andrejev

  7. Hi,

    Related to incomplete orders in 5.0.1 version we have changed logic of how
    it works and now incomplete order is created only when user adds product to
    cart and not each time user visits a site. This should help for cases, when
    google or other search bot indexes whole product catalog creating a lot of
    incomplete orders.

    As an option during upgrade to in-commerce 5.0.1 we can intellectually
    guess, what of incomplete orders were not created by humans and to delete
    them. Dima what's your opinion about this. If possible, then please provide
    Orders and OrderItems tables from live site, where are data samples of how
    exactly google created orders looks like.

    Related to option to turn visits off I aggree, it's useful option, what you
    think Dima?


  8. 1. Yes, I agree that Visitor Tracking can be disabled by default. I have
    noticed that Visits table grows pretty fast on some site adding
    unnecessary load on DB.

    Will be added in 5.1.0 --

    INP-150 - Getting issue details... STATUS

    2. Yes - we'll add up a script to the 5.0.1 upgrade that will clean up
    ALL Incomplete Orders!

    MINC-14 - Getting issue details... STATUS



    Best Regards,

    Dmitry V. Andrejev