We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31671
    • 13 Posts
    I´m trying to load an animated Gif with phpThumbOf. But it only shows the first frame of the Gif.
    Is it not possible with phpThumbOf or is there an issue in my configuration?

    I have
    phpThumbOf 1.4,
    modx 2.2.5,
    php 5.3.18.
      • 33337
      • 3,975 Posts
      phpThumbOf uses phpThumb, This might help you: http://stackoverflow.com/a/1365832

      Hope it helps. smiley
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 31671
        • 13 Posts
        Thank you for your answer Zaigham, but unfortunately, it doesn´t work.
        I tried
        <img src="assets/xxx/xxxx/xxxAnim.gif" />
        --> that is working

        <img src="[[phpthumbof? &input=`assets/xxx/xxxx/xxxAnim.gif` &options=`&f=gif`]]" />
        --> that is not working

        Also "&sfn=2" as shown here
        http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x11
        is not working. I don´t need that, just for testing.

        I have a template for the sites which is using phpThumbOf for the pictures, so it would be great to have the animated Gifs working with that template.


          • 33337
          • 3,975 Posts
          Animated GIF support needs ImageMagick to work properly. I suspect that phpThumb is unable to find ImageMagick and using GD lib to process the image files.

          You can debug by using demo files inside phpThumb/demos/ folder and see if everything is alright and configured correctly.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 31671
            • 13 Posts
            Thank you again, Zaigham. On my webspace I can only use ImageMagick with a .htaccess file and cgi.
            I tried this with the package from phpthumb.sourceforge.net in the modxs root folder and it is working after a change in the
            phpThumb.config.php file from:
            $PHPTHUMB_CONFIG['imagemagick_path'] = 'null';
            to
            $PHPTHUMB_CONFIG['imagemagick_path'] = '/usr/bin/convert';

            Now I have a .htaccess file with
            AddHandler php5-cgi .php
            in core/model/phpthumb
            and I tried to change the path in the file
            core/model/phpthumb/phpthumb.class.php
            in line 118 to:
            public $config_imagemagick_path = '/usr/bin/convert';

            But the animated gifs they are going through phpTumbof only showing the first frame.
              • 31671
              • 13 Posts
              So, reinstalled phpThumbOf 1.4 and put in
              /usr/bin/convert/
              in the System Settings -> core -> phpThumb -> phpThumb ImageMagick Path.

              But it is the same, no working animated gif.
              Why is it working with phpThumb with the configuration from my post above,
              but not with phpThumbOf? How to configure that correctly?