We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Magnatron [Maarten Wolzak] Reply #1, 17 years, 6 months ago
    This is an auto-generated support/comment thread for ImgResizer.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Resizes images so visitors don't have to download the huge images your content-managers have resized in a rich text editor...
      • 6726
      • 7,075 Posts
      That’s Great Magnatron and one of the top feature request I have at the french forums : you’ll make a lot of people very happy there smiley

      It’s really a bonus that it does not rely on gd or imagemagick, as some people do not have this on their server... off to testing and reporting ImgResizer release on the french forum grin

      Thanks again !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 29606
        • 63 Posts
        I tried it and it didn’t work at first. But I took a look at the code, and changed a couple of things, now it works fine.
        Here is what needed to be changed :
        In img.php :
        replace every :
        realpath("../cache/")."\\".$cacheimgname)

        With :
        realpath("../cache/")."/".$cacheimgname)

        (Well, I guess at least on a Unix server)

        Then in imgResizer (the plugin code) :
        $replace[0][$n] = preg_replace('/src="([^"]*)"/', 'src="assets/images/img.php?f=$1&'.$orientation[0].'='.$sd.'"', $replace[0][$n]);

        with :
        $replace[0][$n] = preg_replace('/src="assets\/images\/([^"]*)"/', 'src="assets/images/img.php?f=$1&'.$orientation[0].'='.$sd.'"', $replace[0][$n]);

        (this corrects a path problem)

        It works for me, I hope it’ll do the same for you !
          • 6316
          • 92 Posts
          If you have a problem (usually appears with big pictures, more than 1200 px x 1200 px)
          Fatal error: Allowed memory size of 4194304 bytes exhausted (tried to allocate X bytes)

          open img.php (from assets/images) and find this:
          	// Increase memory limit to support larger files
          	ini_set('memory_limit', '4M');

          Change ’4M’ to ’8M’. If that didn’t help, change to a bigger value.
            • 6316
            • 92 Posts
            A small request: please prevent ImgResizer from recompressing my images which weren’t resized. I have a .jpg image with some text, but after I added it to my document, I could hardly read anything on it as the compression level is very high. I didn’t resize it.
              • 19600
              • 1 Posts
              hi,

              I tried to install this plugin but it’s not working for me. I made this steps:
              - copy img.php an images catalog
              - paste plugin code in plugin resources
              - changed code with this small corrections (that I found in this forum)

              and what I should do next? I must simply put pix in text editor and plugin made thumbnail automatically?

              or I made something wrong?
                • 13137
                • 204 Posts
                I too followed the steps and its not working for me either.

                Anyone know if this works with the current version .9.6 and TinyMCE ?
                  • 15011
                  • 1 Posts
                  Hi,

                  you have to ensure, that the php tags <?php and ?> is not encluded in the plugin.
                  Check the repo, there is a new version with lightbox support.
                    • 6726
                    • 7,075 Posts
                    I don’t mean to say ImgResizer is not good, but I have happily used the DirectResize which is (IMHO) more efficient... you should check it out !

                    Latest DirectResize (version 0.7) package can be downloaded here (plugin is developped by alphanono - who is french - and the thread above contains the oldest 0.5 release).

                    I’ll ask him to add this into the resources pages but for the moment, use the direct link above smiley

                    If you have trouble making it work I’ll happily provide support on the original thread.
                    I’ll try to take some time to translate the doc, I think it’s only in french right now... this plugin deserves to be known, I use it on every client install, made my life easier !!!
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 23050
                      • 1,842 Posts
                      Hi,

                      Yes, I tried to translate the plugin but I don’t know if I was clear enough : http://modxcms.com/forums/index.php?topic=13937.0 grin