diff options
-rw-r--r-- | admin/include/functions_upload.inc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php index bfe972d25..648b8ddc6 100644 --- a/admin/include/functions_upload.inc.php +++ b/admin/include/functions_upload.inc.php @@ -334,6 +334,24 @@ SELECT invalidate_user_cache(); + // cache thumbnail + $query = ' +SELECT + id, + path + FROM '.IMAGES_TABLE.' + WHERE id = '.$image_id.' +;'; + $image_infos = pwg_db_fetch_assoc(pwg_query($query)); + + set_make_full_url(); + // in case we are on uploadify.php, we have to replace the false path + $thumb_url = preg_replace('#admin/include/i#', 'i', DerivativeImage::thumb_url($image_infos)); + unset_make_full_url(); + + fetchRemote($thumb_url, $dest); + + return $image_id; } |