title: How to Batch resize images with PHP
body: <p>I am maintaining an old website. Now my client wants to add more than 6000 products. The product images have different sizes. I have to apply batch process. I have to resize them all to a thumb size of 230x230. Is there any way to do if from PHP?  If so how?</p>
  
  <p>I have to read all content from different folders which are inside a main images folders. This images folder has 40 subfolders. Each folder name is the category name and the images inside it are products (image).</p>
  
  <pre><code>if(imagecopyresampled($NewCanves, $NewImage,0, 0, 0, 0, $NewWidth, $NewHeight, $iWidth, $iHeight))
  {
      // copy file
      if(imagejpeg($NewCanves,$DestImage,$Quality))
      {
          imagedestroy($NewCanves);
          return true;
      }
  }
  </code></pre>