phpThumb caching of remote image media sources

I have a folder of images outside of the MODx installation folder and accessed through a media source. phpThumb creates a full sized copy of this image at assets/components/phpthumbof/cache/remote-images/…

Then it builds thumbnails and stores them in the configured location at assets/images-cache/…

The problem I’m having is if someone replaces an image in the media source location phpThumb doesn’t update it’s local copy. Clearing the resized thumbnails it generated just rebuilds them from the local copy. It took me forever to figure out why they weren’t updating.

Is there a setting that would help fix this? Either keeping it from making a local copy or tell it to update the local copy some how?

I don’t think so.

There is a setting pthumb.clean_level that deletes files in the “remote-images” folder on the event OnSiteRefresh. But it also deletes the other cached thumbnails (so you probably don’t want to change it).

Maybe you could write a custom plugin that clears the “remote-images” folder on a certain event (or alternatively runs periodically with a cronjob).