We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33982 ☆ A M B ☆
    • 476 Posts
    We're running a site on MODX 2.5 (newest at this writing), running the newest version of pThumb (it's fully updated) on the MODX cloud hosting platform.

    We're starting to run into problems with our MODX websites b/c they are failing the Google speed test and the culprit is mostly the images not being compressed correctly. On the WP platform, they have plugins that can compress the images using Tiny PNG's image compression. I've been trying to find something comparable in MODX but have yet to find it that will take an image the client uploads and compress it for them enough to pass the Google speed test (as well as score high on Pingdom and other speed test sites). We've tried downloading the files from the pThumb cache and compressing the images, but this isn't working (as every time the cache gets cleared or the client uploads new images, they'd have to physically go and compress them first which is just not going to happen).

    We're using a pretty standard call to resize the image in pThumb:
    [[+tv.portfolio-image:pthumb=`w=475&h=280&zc=1`]]

    Obviously we could remove pThumb and tell the client to resize the images in advance over at Tiny PNG but that's just not going to happen.

    Anyone found a solution to resolve this issue with MODX yet? If so, would you mind sharing what you found that works? [ed. note: flinx777 last edited this post 10 years, 3 months ago.]
      Precision Web Development ... SmashStack.com
      • 4172
      • 5,888 Posts
      Did you read and understand fully, how pThumbs caching works and which caching-options it has?
      https://github.com/modxcms/pThumb

      If speed counts, also at first image-call, you should try to resize images at upload-time with something like that:
      https://bezumkin.ru/sections/components/118/
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 20413
        • 2,877 Posts
        Another API I should modxify: http://resmush.it/api

        This would be ideal on file upload
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 3749
          • 24,544 Posts
          I still miss the old MaxiGallery extra from Evo, which would create several size images (and had an option to create drop-shadows) on upload. IIRC, you could customize the sizes.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 33982 ☆ A M B ☆
            • 476 Posts
            Quote from: Bruno17 at Jul 01, 2016, 12:14 PM
            Did you read and understand fully, how pThumbs caching works and which caching-options it has?
            https://github.com/modxcms/pThumb

            If speed counts, also at first image-call, you should try to resize images at upload-time with something like that:
            https://bezumkin.ru/sections/components/118/
            Thanks for that response. We'll study this today and once we figure this out, I'll post back a response.

            Quote from: mrhaw at Jul 01, 2016, 12:22 PM
            Another API I should modxify: http://resmush.it/api

            This would be ideal on file upload
            Hey Mr. Haw, great hearing from you. I haven't really been on the forums in years and I miss the days where you were always helping everyone out.

            Quote from: BobRay at Jul 02, 2016, 01:46 AM
            I still miss the old MaxiGallery extra from Evo, which would create several size images (and had an option to create drop-shadows) on upload. IIRC, you could customize the sizes.
            Ha! I do miss elements of Evo as well. You still traveling the U.S. in your R.V.? It was great seeing you a few years ago down in Fort Meyers. Thanks for still sticking around on the forums and helping out.
              Precision Web Development ... SmashStack.com
              • 33982 ☆ A M B ☆
              • 476 Posts
              Quote from: Bruno17 at Jul 01, 2016, 12:14 PM
              Did you read and understand fully, how pThumbs caching works and which caching-options it has?
              https://github.com/modxcms/pThumb

              If speed counts, also at first image-call, you should try to resize images at upload-time with something like that:
              https://bezumkin.ru/sections/components/118/
              So the caching is not the issue with pThumb, the issue is the with the image size and compressing it. We tried that approach you referenced (and thanks for that info btw), but it's not changing the score at all.

              The http://resmush.it/api approach looks interesting though...we'll play around with that for a little bit to see if we can build something to handle compressing when uploading the image.
                Precision Web Development ... SmashStack.com
                • 3749
                • 24,544 Posts
                If you find something that works well, it may be possible to add it as an option to the FileUpload extra. It would be nice to create multiple image files prefixed with small-, medium-, large-, and extra-large-.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 33982 ☆ A M B ☆
                  • 476 Posts
                  Quote from: BobRay at Jul 06, 2016, 12:04 AM
                  If you find something that works well, it may be possible to add it as an option to the FileUpload extra. It would be nice to create multiple image files prefixed with small-, medium-, large-, and extra-large-.
                  Will do. We're going to work on building a plugin shortly to compress these images as the Google speed test scores are killing us.
                    Precision Web Development ... SmashStack.com