Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/thumbs.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/thumbs.php,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/thumbs.php 27 Mar 2009 08:20:44 -0000 1.10 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/thumbs.php 23 May 2010 11:58:33 -0000 1.11 @@ -23,6 +23,16 @@ //get the image and the full path to the image $image = rawurldecode($_GET['img']); + +// If the image is a URL, see if there is an x-thumbnail x-thumb or x-tn param on it +// probably best to use x-tn to save space on the URL +if(preg_match('/^[a-z]+:\/\/.*[?&]x-(thumbnail|thumb|tn)=([^&]+)/i', $image, $Matches)) +{ + // In which case, we will use the thumbnail + header('location: ' . rawurldecode($Matches[2])); + exit; +} + $fullpath = Files::makeFile($manager->getImagesDir(),$image); //not a file, so exit