We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2042
    • 20 Posts
    Hi fellas!

    I have a "strange" problem with Media Source & phpThumbOf.
    I created a new Media Source -> "Media" for my Media folder wich is located in "assets/media/" everything works fine, but when i use phpThumbOf for scaling the picture nothing happens, the image is shown in the original size...
    When i use "Filesystem" as Media Source phpThumbOf works perfectly

    I already searched over several hours to find a solution.

    Anyone can help me?

    Regards

    M.
    • I have been battling with this myself. Make sure that your TV for the images are set to use your Media Source "Media". Also, check the error log and see what path it is trying to use for the image. It is displaying the original image because it cannot find the path somehow. At one point I had to use this snippet call for phpthumbsof:
      [[!phpthumbof? &input=`../[[+filename]]` &options=`&w=640&h=480&zc=0&aoe=0&far=0`]]
      . for the input, I needed to add a ../ infront of the filename. This worked for a while, until I installed Babel and starting using different contexts. Then it stopped working this way. I solve that by create a base_url setting for each context and leaving it empty.

      It seems that there are some major problems with the concept of these media sources and how to implement them in a site. I hope that this will be taken care of.

      The problem I am having now, is that I can't correctly insert images using TinyMCE
        Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
        • 2042
        • 20 Posts
        kk thx for the hints smiley i will try it laugh

        Regards!

        M.
          • 38556
          • 6 Posts
          Hi... I ran in to this today and like to describe how I solved it:

          I use a TV to call for the image. The TV is set to a Media Source.

          I then have a chunk make the call. Everything was nice until I put on PHPThumbof ... and then nothing worked since the URL was wrong (dubbel folders and slasch = folder//folder/image.jpg)

          I went back to Medie Sources and turned Relative Path on "baseUrl" to No. This seems to do it for me.
          (The basePath is still set to relative)

          The baseUrl is:
          assets/images_map/

          Running on Revo 2.2.2

          Best Regards
          Micke [ed. note: pigment last edited this post 11 years, 10 months ago.]
            Micke Pigment
          • Hmm.. I am running Revo 2.2.5 and Babel 2.2.5 and these settings do not change anything for me. I am using image TVs with a media source and using phpmythumbof to change the size. I am still getting the path to include an extra '/'. For example

            path_to_www//de/assets/webmaster/hintergrundbilder/DSC04846.jpg
              Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
            • Ok, I take that back. There must have been something in the cache. cleared the cache, shut the browser, went back in, applied the steps that you wrote, and then it worked.... hmm...
                Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
                • 38121
                • 36 Posts
                The solution pigment found is interesting and working (revo 2.2.5-pl tradi., phpThumbOf 1.4.0)

                However, it doesn't address the root issue and causes another issue: the basePath and baseUrl of the media source now need to be absolute to the server root for images to show up in the manager (notice the leading slash):
                /path/to/the/directory/

                This means media sources will break when moving modx to a different location. Say it was in a sub-directory and you move it to another one or to the server root... and bam!, you're good to go over all media sources to change all the [now broken] paths and urls...

                Let me take all that back, what ever the config, nothing works. Images show up either in the manager, either on the front-end, but never in both at the same time. I'll hack phpThumbOf until a fix is released. [ed. note: yogooo last edited this post 11 years, 3 months ago.]
                  • 37984
                  • 215 Posts
                  Using pigment's fix, I got this working no issues in MODX 2.2.6. There are a few important details, though.

                  In your media source, the basePath needs to have a "/" in front of it (example: /assets/media/) and a basePathRelative setting of Yes.
                  The baseUrl setting needs to eliminate the leading slash (example: assets/media/) and a baseUrlRelative setting of No.

                  This allows for phpThumbOf to function properly, as the absolute url it generates in front of the image path always ends with a "/" and if you add your own in the media source, you get a double slash "//" and the resize fails.
                    Jesse Couch
                    MODX Aficionado, Front-End Designer & Developer
                    http://www.designcouch.com
                    • 46236
                    • 3 Posts
                    I had the same problem with phpthumbof in combination with babel multilingual site and base_url s. phpthumbof didn't work because of double slash in the image url.

                    Pigment's fix was the solution.

                    In the settings of the media-source that uses phpthumbof I set the "basePathRelative" and the "baseUrlRelative" to NO.

                    Thanks pigment


                      • 50923
                      • 137 Posts
                      Also same problem with revo 2.2.0 and Babel 3.0. But pigment solution solved my problem. Txanks
                        <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>