We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22844
    • 7 Posts
    I can’t see my client being able to reduce her images sizes before she uploads them to her gallery on modx.

    Is there a way to make my idiot proof so that when my client decides to upload any size of image it will scale inside the container?

    I have is currently set up at &imageWidth=`690` &imageHeight=`480`

    I tested it out with an image that was quite large, both file size and scale, and it knocked it well out of the container and half way off the page.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Depending on how you’re displaying the images, there are a few phpThumb options; I am inclined to use MiniPhoto; it’s a snippet that works something like a subset of phpThumb, resizing a specified image on-the-fly, and using a cached version if one is available to save time and processor cycles.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22844
        • 7 Posts
        Can you go into more detail on this?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I’m not familiar with Gallerific, so I’m not sure how it would deal with image sizes.

          I usually use MiniPhoto in Ditto tpls, like this:
          <img src="[[MiniPhoto? &file=`[+tvphoto+]` &width=`108` &height=`81`]]" width="108" height="81" alt="" class="photo left" />

          tvphoto would be the name of the image-type TV where the user uploads the image for the news or blog post (or whatever Ditto will be listing).
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 22844
            • 7 Posts
            Well I’m hoping this will work but not sure how to combine the two.

            In my Gallery page Template, I’m using the galleriffic snippet:

            [[!Gallery? &album=`Test` &autoStart=`0` &gallerifficThumbWidth=`95` &gallerifficThumbHeight=`95` 
            &plugin=`galleriffic` &imageWidth=`690` &imageHeight=`480` &navigationWidth=`300px` &numThumbs=`10` &prevLinkText=`< Prev` &nextLinkText=`Next >`
            &prevPageLinkText=`< Prev` &nextPageLinkText=`Next >` &enableTopPager=`0` &defaultTransitionDuration=`500` 
            &delay=`4000`]]


            I would like to use this MiniPhoto to apply some sort of compression to all the big photos that get added anytime in the future. Do you know where I would put the Miniphoto snippet?