0
<img src = "[[+tv.img:phpthumbof=`w=180&h=150`]]">

This construction returns image with original size

  1. I tried create phpthumbof/cache with 777
  2. I tried reinstall phpthumbof
  3. ImageMagick installed in php
  4. "phpthumb:...allow...docroot..." enabled in config
  5. I tried "pthumb", but same result
Alex
  • 3
  • 3

3 Answers3

0

I think that the way you are attempting to use it could be the issue, you can either try:

<img src = "[[!phpthumbof? &input=`[[+tv.img]]` &options=`&w=180&h=150`]]">

Or change your TV output type to "image" then:

[[+tv.img:phpthumbof=`w=180&h=150`]]

Should work.

I think what might be happening is that your TV output is just the path & phpthumbof can't do anything with just the path it needs the actual image as input ~ so it's just getting ignored.

Sean Kimball
  • 4,506
  • 9
  • 42
  • 73
0

You don't say what version MODX you are using. But this is how I usually do it:

<img src="[[*myimagetv:phpthumbof=`w=180&h=150`]]">

myimagetv TV

Input type: image

Output type: text

Note: if your tag is inside a chunk template called by a snippet, then the asterisk should be a plus sign instead.

LIannotti
  • 382
  • 1
  • 11
0

If you use phpthumbof on a subfolder on your webserver than phpthumbof uses internally the wrong path.

For example: Your document root ist yourdomain.de and points to /var/www/htdocs/yourdomain.de

Your MODX-Installation is in the subfolder /var/www/htdocs/yourdomain.de/test/

You edit your MODX-test-"domain" with yourdomain.de/test/manager. -> everything is working as expected (phpthumbof not)

if you create a new subdomain aka test.yourdomain.de as a real document root und map this domain to your subfolder /var/www/htdocs/yourdomain.de/test/ phpthumbof is working as expected!

Keep in mind to clear the MODX-Cache before changing and to modify the file core/config/config.inc.php (only the entries with relative paths!)

Oliver

Oliver
  • 27
  • 4