Everytime thumb_path is called, a new thumbnail is generated -- severely impacting performance. It would be nice to allow the admin to specify a getting for how many days to cache the thumbnails for.

For the meantime, I popped these lines in at the top of _thumb:

// RETURN CACHED IMAGE
$realpath = $dir.'/'.$pathinfo['basename'].'.'.$pathinfo['extension'];
if(file_exists($realpath)) {
thumb_transfer($realpath);
return;
}

Comments

davyvdb’s picture

Status: Active » Fixed

phpThumb is creating its own cache file :

$thumb->config_output_format = $pathinfo['extension'];
$thumb->config_error_die_on_error = TRUE;
$thumb->config_document_root = '';
$thumb->config_temp_directory = file_directory_temp();
$thumb->config_cache_directory = file_directory_temp() .'/cache/';
$thumb->config_cache_disable_warning = TRUE;

Maybe you need to make the cache directory writable?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.