@someone
I did it this way and it works for me :
$params = array(); $params['input'] = $image; // URL to the large image $options = '&f=jpg'; $options .= '&w='.$thumbnailsWidth; $options .= '&h='.$thumbnailsHeight; $options .= '&zc=1'; $options .= '&fltr=usm|'.$thumbnailsSharpen; $params['options'] = $options; $thumbnail = $modx->runSnippet("phpthumbof", $params);
<img src="[[+tv.img_level3_product:phpthumb=`&f=jpeg&q=75&w=190`]]" alt="[[+tv.title_nl]]" width="190" class="product" />
<img src="[[+tv.img_level3_product:phpthumbof=`&f=jpeg&q=75&w=190`]]" alt="[[+tv.title_nl]]" width="190" class="product" />
[[!getResources? &parents=`22`&limit=`4` &showHidden=`1` &tpl=`popularProductBox` &includeTVs=`1` &processTVs=`1`]]
<div class="productBox"><h4>[[+pagetitle]]</h4> [[+tv.photo:phpthumbof=`&f=jpeg&q=75&wl=75`]] <p>[[+description]]</p> <p><a href="#">Find out more...</a></p> </div>
[2011-01-17 15:23:41] (ERROR @ /xxxxxx/index.php) [phpThumbOf] Could not generate thumbnail: - Debug: Array ( [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216 [1] => setCacheDirectory() starting with config_cache_directory = "/home/sites/xxx.xx.xx/public_html/xxxxxx/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919 [2] => setting config_cache_directory to realpath(/home/sites/xxx.xx.xx/public_html/xxxxxx/core/cache/phpthumb) = "/home/sites/xxx.xx.xx/public_html/xxxxxx/core/cache/phpthumb" in file "phpthumb.class.php" on line 947 [3] => setCacheDirectory() starting with config_cache_directory = "/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 919 [4] => setting config_cache_directory to realpath(/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache) = "/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947 [5] => setSourceFilename() set $this->sourceFilename to "" in file "phpthumb.class.php" on line 243 [6] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652 [7] => file_exists() = 0 in file "phpthumb.class.php" on line 1101 [8] => is_executable() = 0 in file "phpthumb.class.php" on line 1102 [9] => using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1121 [10] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148 [11] => ImageMagick did not return recognized version string (Version: ImageMagick 6.4.3 2008-08-28 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC) in file "phpthumb.class.php" on line 1154 [12] => ImageMagick convert --version says "Unknown" in file "phpthumb.class.php" on line 1157 [13] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884 [14] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895 [15] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902 [16] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912 [17] => $this->sourceFilename set to "/home/sites/xxx.xx.xx/public_html//xxxxxx/" in file "phpthumb.class.php" on line 813 [18] => phpThumb() v1.7.9-200712090829 "/home/sites/xxx.xx.xx/public_html//xxxxxx/" does not exist in file "phpthumb.class.php" on line 3652 [19] => setCacheDirectory() starting with config_cache_directory = "/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 919 [20] => setting config_cache_directory to realpath(/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache) = "/home/sites/xxx.xx.xx/public_html/xxxxxx/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947 [21] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/sites/xxx.xx.xx/public_html//xxxxxx/" = "706e91ccbc8d4d654485fad12a0734a6" in file "phpthumb.class.php" on line 3074 [22] => SetCacheFilename() _par set from md5(_farC_wl75_dpi150_q75) in file "phpthumb.class.php" on line 3107 [23] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2894 [24] => GetImageSize("/home/sites/xxx.xx.xx/public_html//xxxxxx/") failed in file "phpthumb.class.php" on line 2917 [25] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 [26] => phpThumb_tempnam() returning "/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbj1ng3j" in file "phpthumb.class.php" on line 3867 [27] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189 [28] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189 [29] => GetImageSize(/home/sites/xxx.xx.xx/public_html//xxxxxx/) FAILED with error "[2011-01-17 15:23:41] (ERROR @ /home/sites/xxx.xx.xx/public_html/xxxxxx/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(/home/sites/xxx.xx.xx/public_html//xxxxxx/<img src="/xxxxxx/assets/components/gallery/connector.php?action=web/phpthumb&w=200&h=143&f=png&src=/xxxxxx/assets/components/gallery/files/2011/01/booklet.jpg" alt="" title="Booklet" class="" />) [function.getimagesize]: failed to open stream: No such file or directory " in file "phpthumb.class.php" on line 1318 [30] => GetImageSize(/home/sites/xxx.xx.xx/public_html//xxxxxx/) failed in file "phpthumb.class.php" on line 1460 [31] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807 [32] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186 [33] => ImageMagick called as (convert -density 150 -quality 75 -interlace line "/home/sites/xxx.xx.xx/public_html//xxxxxx/[0]" jpeg:"/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbj1ng3j" 2>&1) in file "phpthumb.class.php" on line 1826 [34] => ImageMagick failed with message (sh: jpeg:/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbj1ng3j: No such file or directory) in file "phpthumb.class.php" on line 1834 [35] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2924 [36] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2873 [37] => SetOrientationDependantWidthHeight() setting w="75", h="0" in file "phpthumb.class.php" on line 2889 [38] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2976 [39] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3234 [40] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 [41] => phpThumb_tempnam() returning "/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbxryc2x" in file "phpthumb.class.php" on line 3867 [42] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189 [43] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189 [44] => GetImageSize(/home/sites/xxx.xx.xx/public_html//xxxxxx/) FAILED with error "[2011-01-17 15:23:41] (ERROR @ /home/sites/xxx.xx.xx/public_html/xxxxxx/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(/home/sites/xxx.xx.xx/public_html//xxxxxx/<img src="/xxxxxx/assets/components/gallery/connector.php?action=web/phpthumb&w=200&h=143&f=png&src=/xxxxxx/assets/components/gallery/files/2011/01/booklet.jpg" alt="" title="Booklet" class="" />) [function.getimagesize]: failed to open stream: No such file or directory " in file "phpthumb.class.php" on line 1318 [45] => GetImageSize(/home/sites/xxx.xx.xx/public_html//xxxxxx/) failed in file "phpthumb.class.php" on line 1460 [46] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807 [47] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186 [48] => ImageMagick called as (convert -density 150 -thumbnail 75x -quality 75 -interlace line "/home/sites/xxx.xx.xx/public_html//xxxxxx/[0]" jpeg:"/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbxryc2x" 2>&1) in file "phpthumb.class.php" on line 1826 [49] => ImageMagick failed with message (sh: jpeg:/home/sites/xxx.xx.xx/public_html/xxxxxx/pThumbxryc2x: No such file or directory) in file "phpthumb.class.php" on line 1834 [50] => starting ImageCreateFromFilename(/home/sites/xxx.xx.xx/public_html//xxxxxx/) in file "phpthumb.class.php" on line 3149 [51] => empty $filename or GetImageSize(/home/sites/xxx.xx.xx/public_html//xxxxxx/) failed in file "phpthumb.class.php" on line 3198 [52] => Populating $rawimagedata in file "phpthumb.class.php" on line 3206 [53] => cannot fopen(/home/sites/xxx.xx.xx/public_html//xxxxxx/) in file "phpthumb.class.php" on line 3217 [54] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3283 [55] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3335 [56] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3337 [57] => phpThumb() v1.7.9-200712090829 Unknown image type identified by "" () in SourceImageToGD()[3449] in file "phpthumb.class.php" on line 3652 [58] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
Any idea why I am getting a crazy path back? (/assets/components/phpthumbof/cache/var/www/vhosts/xxx/xxx.xxx.com/htdocs/assets/components/phpthumbof/cache/assets_images_papericon.jpg.44a3e177ce23da9b0c3708f158b746e0.png)
"/assets/components/phpthumbof/cache" should be sufficient and "/var/www/vhosts/xxx/xxx.xxx.com/htdocs/..." is my system mapping. Not sure how/why this would happen. Any idea?