We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4099
    • 11 Posts
    Quote from: doze at Aug 27, 2009, 04:01 PM

    To get phpthumb to zoom crop the large image, you need to modify your javascript function what changes the picture. By default it just loads the image there, but you actually would want to pass the image to phpthumb and ask it to generate the zoom cropped image.

    I’m having trouble getting it to crop with js, any tips?
      • 7923
      • 4,213 Posts
      I would think that something like this should do it (didn’t test it), depends where you have setup phpthumb and how.

      function doImage(img,url,width,height) {
         img.src='/assets/snippets/phpthumb/phpThumb.php?src='+url+'&h=400&w=400&zc=1&q=95';
      }
      


      Above is just a part of the js from maxigallery wiki article, you need the showPic() function too of course.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."