We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    I can not get phpthumbof to work on an image in my chunk that is from migxdb.

    My chunk is called ''tpl_artists_page" that code looks like this:

    <a class="fancybox" rel="group" href="/manager/templates/edelman/artwork/[[+image]]"><img src="/manager/templates/edelman/artwork/[[+image:phpthumbof=`w=300&h=200&f=jpg&zc=1`]]" alt="[[+title]]" /></a>
    


    My call in my template looks like this:
    				<div id="artContent" class="threeQuarters right contentContain">
    					[[!migxLoopCollection?
    					&packageName=`artwork`
    					&classname=`artWorks`
    					&sortConfig=`[{"sortby":"title","sortdir":"ASC"}]`
    					&where=`{"artist_resource_id":"[[*id]]"}`
    					&tpl=`tpl_artist_page`
    					]]	
    				</div><!-- close artContent-->


    Everything works except phpthumbof does not resize the images. The images show up at normal size. Does anyone know why this is not working?

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

    • discuss.answer
      • 35150 ☆ A M B ☆
      • 191 Posts
      Probably because the path to the image is /manager/templates/edelman/artwork/[[+image]] but you're only giving the last part ( [[+image]] ) to phpthumbof. How is it to know to look in /manager/template/edelman/artwork for that file?

      Instead try:
      <img src="[[phpthumbof? &input=`/manager/templates/edelman/artwork/[[+image]]` &options=`w=300&h=200&f=jpg&zc=1`]]" alt="[[+title]]" />
        Extras :: pThumb • Resizer • imageSlim • setPlaceholders
        • 37165
        • 89 Posts
        Works perfect now. Thank you
          • 30912
          • 463 Posts
          [[+image:phpthumbof=`w=300&h=200&f=jpg&zc=1`]]


          should work just fine also.

            • 4172
            • 5,888 Posts
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!