We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1778
    • 659 Posts
    Hello
    This time I have ImageMagick well installed (phpinfo => imagick module version 2.3.0-rc3), still have no image but now it's not the icone for broken link but a rectangle, seeing the page with FF, I have this error in the debugger

    Image corrupt or truncated: http://localhost/revo22/assets/components/gallery/connector.php?action=web/phpthumb&h=100&w=100&zc=1&far=C&src=%2Frevo22%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F6%2F23.png
    


    Idem with a .jpg or .jpeg file... What am I doing wrong ? Again a problem of config ? How can I debug ? and how can I solve it ?

    The images and folders are still here, and I can open them in any image editor...

    Config

    Apache/2.2.21 (Win32) PHP/5.3.10
    MySQL server: 5.5.20-log
    mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $
    MODX Revolution 2.2.1-dev (git)
      • 44659
      • 20 Posts
      Hi.

      Little refresh, because i have the same problem as above, except that i use Gallery add-on. My FF debugger show corrupt image error too. In addition some images generated by Gallery are incomplete (for example 70% of image is loaded, and the rest is empty or white). When i save that picture to computer, there is grey background instead of white.

      I use MODx Revo 2.2.8-pl on nginx/1.2.7

      BTW. Hello Everyone - my first, and not last post smiley
        • 42046
        • 436 Posts
        Are these the thumbnails that are being corrupted?

        I would suggest it's timing out whist generating the images. This can be particularly taxing on the server if the site cache is cleared and they all need to be regenerated when the page is visited.

        I've found it more efficient and speedier not to use built in Gallery add-on image generation but instead use phpThumbsUp and replace the [[+thumb]] in the template chuck with something along the lines of:

        [[+fileurl:phpthumbsup=`&w=520&h=390&zc=1&far=C&q=90`]]


        And then set phpThumbsUp in the system settings not to clear it's cache when the site cache is cleared.

        http://modx.com/extras/package/phpthumbsup
          • 44659
          • 20 Posts
          Hi.

          Sorry for that delay, but i Was on vacation for 1 week smiley

          There's no about thumbnail, but actual image. I suppose the problem may be due by link which is send to browser:
          e.g. "/assets/components/gallery/connector.php?action=web/phpthumb&w=0&h=0&zc=0&far=&q=90&src=%2Fassets%2Fgallery%2F1%2F35.jpg", although "Content-type" is proper (image/jpeg).

          Weird thing is, when i skip properties "&imageWidth and &imageHeight" then it's alright. But i need to overwrite these default values (both to 0) to keep original size of image.
            • 42046
            • 436 Posts
            If you want to keep the original image size why go through phpthumb? You can use [[+image_absolute]] or [[+fileurl]] instead.
              • 44659
              • 20 Posts
              It's part of Gallery add-on.
              The "/assets/components/gallery/connector.php?action=web/phpthumb&w=0&h=0&zc=0&far=&q=90&src=%2Fassets%2Fgallery%2F1%2F35.jpg" part is from [[+image]] placeholder of Gallery snippet.

              My problem isn't so annoying until it's problem with some of FF versions.
              Chrome, Opera and even IE display it properly.
                • 42046
                • 436 Posts
                What's your tpl code?
                  • 44659
                  • 20 Posts
                  It's just really simple
                  <img src="[[+image]]" alt="" />
                  That's all.

                  And gallery is generating by:
                  [[!Gallery? &album=`1` &imageWidth=`0` &imageHeight=`0` &thumbTpl=`tplMainImgSlider` &albumRequestVar=`main-gal`]]


                  Problem occurs regardless there's "no-cache (!)" sing or not.

                  I think theres something with my FF because when i clear history (cache) and load page, it's alright, but after F5 refresh the problem back. But there's no problem, when refresh with CTRL+F5 (non-cache). In both cases, server response for image request is always 200 OK (not once 304 Not Modified).
                    • 42046
                    • 436 Posts
                    To keep the original image size just use:

                    <img src="[[+image_absolute]]" alt="" />


                    And:
                    [[!Gallery? &album=`1` &thumbTpl=`tplMainImgSlider` &albumRequestVar=`main-gal`]]
                    [ed. note: absent42 last edited this post 10 years, 9 months ago.]