We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6705
    • 79 Posts
    Quote from: alik at Mar 17, 2010, 02:19 PM

    Mentioned thumbnails are generated by MODx when you access file folder via TV of input type "image".

    Thanks, Alik, but I’m afraid I’m not quite sure what you are saying?

    Are you saying that the thumbnails are only created if the image is included in the page via a TV (rather than the "Insert image" button in the text editor), and the image was originally uploaded to MODx by the user editing the TV, clicking the "Insert" button and then using the "Upload" button in the image browser window (rather than uploading the image directly to the file manager via Elements > Manage Files)?
      Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
    • The resource browser (the window that gets opened with either image-type TVs or using the Insert Image button from the RTE) generates the thumbnails for its own display. Using the Manager’s File Manager to upload images won’t generate them. However, as far as I can tell, just opening the Resource Browser will cause it to generate thumbnails for any images in the assets/images directory that don’t already have one.
        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
        • 6705
        • 79 Posts
        Quote from: sottwell at Mar 17, 2010, 02:54 PM

        The resource browser (the window that gets opened with either image-type TVs or using the Insert Image button from the RTE) generates the thumbnails for its own display. Using the Manager’s File Manager to upload images won’t generate them. However, as far as I can tell, just opening the Resource Browser will cause it to generate thumbnails for any images in the assets/images directory that don’t already have one.

        Thanks for the explanation, Susan. Unfortunately, this doesn’t seem to work on my site: I can upload a file successfully and the Resource Browser clearly thinks for a few moments while generating a thumbnail, but the thumbnail generated is still just the default MODx "camera" icon.

        I wonder perhaps if MODx needs to write the thumbnails to a folder that it does not currently have write permission for? Do you know where MODx stores the thumbnail files?

        Time passes..

        ..I’ve now had a further look at the thumbnail images. It looks as though these may be generated on-the-fly and aren’t perhaps actual files in the filesystem?

        Here’s the URL of the thumbnail for the MODx logo which is in assets/images by default, for example:

        http://mysite.dom/manager/media/browser/mcpuk/connectors/php/connector.php?Command=Thumbnail&Type=images&CurrentFolder=/&FileName=logo.png&ExtraParams=

        ..but all of these thumbnail images are the same default "camera" icon. I wonder why my MODx isn’t generating proper thumbnails?
          Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
        • As far as I know, they are created in the same directory as the images themselves.
            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
            • 6705
            • 79 Posts
            Quote from: sottwell at Mar 17, 2010, 04:48 PM

            As far as I know, they are created in the same directory as the images themselves.

            Thanks. I really wonder why the thumbnail creation is not working for me? Is this just a standard part of MODx functionality, it doesn’t require any other plug-ins to be activated or anything..?

            I’ve created a handful of MODx installations on a few different servers (all RHEL 5 and pretty similar, though) and I think I’ve used every standard (non-RC, etc) release since version 0.9.6.xpy (I can’t remember x and y, it was the (patch?) release, which was the current release at the time, which came before 0.9.6.3), and I don’t think this thumbnail feature has worked on any of them (indeed, I wasn’t even aware of it until this thread).
              Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
            • they begin with a . so unless your FTP client is configured to show "hidden" files you won’t see them. For example, .thumb_logo.png

              If you use the Resource Browser either from an image-type TV or from the Insert Image button of TinyMCE while editing a document, then the thumbnail images you see are these.
                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
                • 6705
                • 79 Posts
                Quote from: sottwell at Mar 18, 2010, 10:03 AM

                they begin with a . so unless your FTP client is configured to show "hidden" files you won’t see them. For example, .thumb_logo.png

                No, it’s not that, I’m afraid (I have shell access to the servers and can see everything that exists). And no custom thumbnails show in the Resource Browser itself (only the default MODx "camera" icon in their place) so I’m pretty sure they’re not being created at all.

                It’s not an enormous issue for me, but it is a bit annoying as it means I won’t be able to use the thumbnail selection technique that was mentioned in this thread.
                  Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
                • Hmm... do you have the GD libraries enabled for your PHP?
                    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
                    • 6705
                    • 79 Posts
                    Quote from: sottwell at Mar 18, 2010, 11:50 AM

                    Hmm... do you have the GD libraries enabled for your PHP?

                    Ah... Bingo! (I didn’t realise that that was a requirement.)

                    GD seems to have been automatically installed as part of the OS install, but the PHP GD module wasn’t. I have installed it now, and thumbnails are now appearing; and I see we get access to some image manipulation tools in the Resource Browser as a result as well. Excellent.

                    Many thanks for your help! grin
                      Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
                    • Don’t depend on those image manipulation tools in the Resource Editor; as far as I know they never have worked. Or at least they never have for any site I’ve tried them on.
                        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