We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5546
    • 23 Posts
    hi,

    i am not sure if this has to do with gallery or gallerriffic, or if it is just specific to modx, but i am trying to figure out why my images are compressed after i upload them to the gallery. is there a way to control this? i did a test with a jpg (orig size ~160K) and a png (orig size ~450K) and both were resized to ~70K.

    i’m using modx revolution: MODx Revolution 2.0.4-pl2


    thank you for any help!!!
      • 5546
      • 23 Posts
      i should note, maybe it doesn’t even have to do with the upload, when i go to view the items in my gallery, it appears they have the same K size of the image i uploaded.
        • 11076
        • 159 Posts
        i think it’s because gallery uses phpthumb to adjust the images before output.
          Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
          • 5546
          • 23 Posts
          is there a way to adjust this? i checked out phpThumbOf but it looks like it only adjusts the dimensions, unless i am not understanding it correctly
            • 28475
            • 28 Posts
            I am having the exact same problem and cannot find the solution.
            The image in the directory: http://www.saskatoonaikido.ca/assets/components/gallery/files/2011/01/02.jpg
            The image Gallery shows: http://www.saskatoonaikido.ca/assets/components/gallery/connector.php?action=web/phpthumb&w=880&h=660&zc=0&far=&src=/assets/components/gallery/files/2011/01/01.jpg

            Note that the width and height in that second URL are what they should be. All my images are 880px in width, and a couple varying heights. Still there is compression somehow.
              • 5546
              • 23 Posts
              i couldn’t figure out a way to not have phpthumb without modifying the plugin. i don’t know enough about php. so all i did was add "q=95" on line 73 of galitem.class.php:

              $assetsUrl .= ’connector.php?action=web/phpthumb&q=95’;

              i know this is ghetto, and modx people might hate me. but i needed this plug in since there aren’t others, and i don’t have the time/knowledge to build my own given my current timeline.
                • 28475
                • 28 Posts
                ^thanks for that!! That worked perfectly for my purposes grin
                  • 42596
                  • 45 Posts
                  So I know this is ancient but I found a way better solution and I had this problem recently so other people might still in the future...

                  Go to edit the variable that outputs the image and in the output options there should be a section that says "Additional phpThumb parameters:"

                  Just stick the q=95 in there...also, and this is just a guess but, i think the q stands for quality and seeing as 95 makes it much better, again, my guess is that this is out of 100...that could do with more research.

                  There is another way which would be better, which would be to stick an output modifier on the TV itself eg: [[+imageTV:phpthumbof=`q=95`]] i havent tried the latter but i really dont see why it wouldn't work.