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

Answered Image+ 2 issues

    • 49710
    • 92 Posts
    Hi,

    I try to display an image from an image+ template var. Here ist the code:

    [[pdoResources?
        &parents=`7`
        &sortby=`{"publishedon":"DESC"}`
        &limit=`6`
        &tpl=`ListRowTpl`
        &includeContent=`1`
        &prepareTVs=`1`
        &processTVs=`1`
        &includeTVs=`article.portal,article.start,article.kategorie,article.picture`
        &tvFilters=`article.start==Ja%`
        &tpl=`tpl.post-startsite`
        &tplFirst=`tpl.post-startsiteFirst`
        &tvPrefix=`tv.`
    ]]



    tpl.post-startsite:
    <div class="col-md-6">
    	<div class="post">
         	<a href="#" class="feature-post-link">
             	<div class="catagory"><span class="label label-default">[[+tv.article.kategorie]]</span></div>
                 	<div class="post-gradient">
                     
    					[[ImagePlus? 
            				&tvname=`article.picture` 
            				&type=`tpl` 
            				&docid=`[[+id]]`
            				&tpl=`tpl.firstIntroPic`
        				]] 
                      </div>
    
                       <div class="post-feature-content">
                       		<span class="post-font-date"><i class="fa fa-calendar" aria-hidden="true"></i> 15.10.2017</span>
                        	<p class="post-feature-font-header">[[+pagetitle]]</p>
                        </div>
            </a>
    	</div>
    </div>



    tpl.firstIntroPic:
     <img src="[[+source.src:pthumb=`w=320`]]" alt="[[+alt]]" class="img-responsive post-img" />


    The first issue ist that the picture will not show. (Error 404).
    And the second is that inside die SourceCode the full Server-URL ist displayed.

    Help please! What can it be?

    This question has been answered by optimuscrime. See the first response.

      • 49710
      • 92 Posts
      Ok, folks now I am little bit f***ed-up!
      I spend hour and hours to find informations to get image+ to work. But nothing that I find works! Really NOTHING!

      I do it it exactly the way the documentation says:
      http://jako.github.io/ImagePlus/usage/

      But this do not work. Either I it show NO image because of the full server path. Or it shows only the original uncropped image.

      I try different variations to put the image out: +url, +source.src....and nothing make the job.

      Yes, I updated it to the newest version. It makes no different.

      Dear developer of this nice tool. It might be nice when it works. But I can not get it run.
      Please tell me what I have to do to get it run.





        • 38783
        • 571 Posts
        Have you also installed pthumb?
        https://modx.com/extras/package/pthumb
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 49710
          • 92 Posts
          Thanks for the hint! Dependencies were not mentioned in the documentation.

          Now with pthumb the full-server-url ist gone and the image will displayed. But still only the non cropped version.
            • 17301
            • 932 Posts
            Good shout, Andy.

            Chris, it is on the documentation on the first screen under requirements: http://jako.github.io/ImagePlus/
            Is this the documentation you're following? IF not then I'd suggest going through the example and seeing if you can get the example to work first and if so, retrofit anything you may be missing.
              ■ email: [email protected] | ■ website: https://alienbuild.uk

              The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
              • 49710
              • 92 Posts
              Hi,
              yes this is the documentation I've been following. Ok I see there ist a hint for pthumbs. I am not the hardcore 24/7 programmer.
              So I thought installing image+....and go. smiley

              See my Code above. I only see the non cropped image.

              In the pdoResources-call I write the TV in &processTVs, but nothing changed.
                • 38783
                • 571 Posts
                Is your TV set to have an Output Type of Image+ ?

                http://jako.github.io/ImagePlus/examples/#using-the-imageplus-snippet-inside-getresourcespdoresources-template-chunk

                Looking at this part of the docs it says:

                In the template Chunk of the getResources/pdoResources Snippet call you could use the placeholder [[+tv.name_of_your_tv]] if the Output Type of the TV is set to Image+. Without additional changes, the placeholder contains the url to the cropped image.
                  If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                  email: [email protected] | website: https://andytough.com
                  • 49710
                  • 92 Posts
                  Yes, it has an output type set as image+

                  It shows me the original non cropped Image. Only in the backend there is an cropped image. [ed. note: ichris89 last edited this post 6 years, 9 months ago.]
                    • 49710
                    • 92 Posts
                    After 2 weeks, I still struggling with that thing. I can't get this thing to run!
                    • discuss.answer
                      • 40358
                      • 40 Posts
                      Despite the fact that I don't really like the approach or the tone taken by the original poster here, I can give you some things to try out.

                      First, go edit the template variable, and set the following options under Output Options:

                      • Output Type: Image+
                      • Generate Thumb URL: Yes

                      In your code you change it to:

                      <img src="
                      [[ImagePlus? 
                          &tvname=`article.picture` 
                          &type=`thumb` 
                          &docid=`[[+id]]`
                          &options=`w=320`
                      ]]" class="img-responsive post-img" />


                      I would also like to note that the code you posted in your original question works fine on my machine. My suggestion here is to check if another approach works. If this does not work either we will need more information about your system and setup. Are you sure you have a image library installed with your PHP installation? ImageMagik or something else?

                      Lastly I would like to add that getting help for a free open source product is not a human right. We spend our time here to answer stuff here for free, outside of work and other things. People complaining is therefore an annoyance. And there is no such thing as a hardcore 24/7 programmer. We have all been stuck with something, and I even bet I've spent more time banging my head against the wall than you have. If you are either unable to solve the problem yourself, or nobody neither has the time to help you, nor understands your problem, you could consider hiring someone to solve it for you. There are plenty of MODX professionals out there that could take care of this for you.