skip to Main Content

I dont really know how to explain this, but..

How do you resize images by batch on photoshop where it scales based on the smaller dimension.

So basically, i want images to resize to 200×200 and I want the image to take the smaller dimension, center the image, then crop the excess of the bigger dimension.

Is there a way to do this?

I hope I make sense.



  1. Go to Image > Image Size.

    This will bring up the Image Size dialog box, as shown below:


    see documentation

    Login or Signup to reply.
  2. This script will resize the image so that the smallest dimension will become 200 and then crop it to 200 x 200

    app.preferences.rulerUnits = Units.PIXELS;
    // call the source document
    var srcDoc = app.activeDocument;
    var imageWidth = srcDoc.width.value;
    var imageHeight = srcDoc.height.value;
    var ts = 200;
    if (imageHeight < imageWidth)
      // landscape
      var h = 200;
      var w = Math.floor((imageWidth/imageHeight)*h);
      // portrait
      var w = 200;
      var h = Math.floor((imageHeight/imageWidth)*w);
    srcDoc.resizeImage(w, h, 72, ResampleMethod.BICUBIC);
    //crop it in the centre
    app.activeDocument.resizeCanvas(ts, ts, AnchorPosition.MIDDLECENTER);
    Login or Signup to reply.
  3. You may need to use Actions and Automate in order to accomplish this. Here is a link to a tutorial:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top