Write imagemagick script and create cron job to run it every 5 minutes.
I was originally on windows and the batch file I used is attached. I am now on a linux machine so the directory structure is different:
c:InetpubwwwrootXwycked
becomes
/var/www/web3/web/
Otherwise the new script should do exactly what the old one does.