We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42318
    • 25 Posts
    Hi modx forum world

    I'm outputting some images using phpthumbof, in a chunk, using getresources

    The image is stored in a template variable and each image is unique and has a different path

    However, when the image has the same filename as a previous image already outputted, regardless of path, it uses the image already outputted, rather than creating a new one.

    It seems that phpthumbof is ignoring the file path and just looking at the filename.

    Any ideas?

    Thanks peeps

    Tim
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I believe that phpthumbof creates its own thumbnails in its own thumbnail folder (assets/components/phpthumbof/cache), so only the image name would be used; if it finds a thumbnail of that name already then it doesn't make a new one.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 40762
        • 54 Posts
        I have the same problem. It seems like when only the last character is different modx doesnt make the difference between the images in question.

          Marc-Andre Audet
          • 40762
          • 54 Posts
          I found a fix for my problem if somebody bumps into this.

          $cut = $length-$extLength;

          I removed -1 in

          core/components/phpthumbof/model/phpthumbof/phpthumbof.class.php

          so far no error to signal. I dont know how to pull a request to fix this bug but if someone could report this to the owner it would be great
            Marc-Andre Audet
            • 35150 ☆ A M B ☆
            • 191 Posts
            You can fix the problem—and another bothersome one—with this.
              Extras :: pThumb • Resizer • imageSlim • setPlaceholders