Cleaning the upload folder from unused image files

It is possible that the usage of the OpenImmo import leads to lots of unused image files in the upload folder. To delete them and also to mark non-referenced image records in the database as hidden, you can use the Scheduler Task “realty: Image cleanup”.

Cleaning the upload folder from unused image files (using the deprecated cronjob)

It is possible that the usage of the OpenImmo import leads to lots of unused image files in the upload folder. To delete them and also to mark non-referenced image records in the database as hidden, there is a CLI script.

Start this script by cronjob:

  1. Create a BE TYPO3 user named “_cli_realty” with User Admin . This user does not need to be configured in any special way but must not be an admin user. (Probably, if you are using the import, there is already such a user in your TYPO3 installation. Then just skip this step.)
  2. Set up a cron job to run PHP with it. The command to use for the cron job is:/[ absolute path of the TYPO3 installation ]/typo3/cli_dispatch.phpsh cleanUpRealtyImages A line in your cron tab that imports realty objects at three o’clock a.m. then could look like this:0 3 * * * /var/www/typo3/cli_dispatch.phpsh cleanUpRealtyImages