We will show you how to batch resize images in a folder using dmxzone image resizer. We want to resize, all of the images in a folder, which are wider than 1200 pixels. This is really useful option, when your users are uploading images via ftp, and they do not resize them, prior uploading. First, let's create a folder, and put the server action inside it. Create the action file. And add a name for it (1). Right click steps. And under file management, select add folder list (2).
And then, select the path to your images folder (1). and click the select button (2)
Also, we like to limit the displayed file types to jpeg. Right click the folder list step. And under core actions, select add repeat.
Then select the expression, for the repeat (1). Our folder list step, should be selected as an expression (2).
then, right click the steps, in the repeater, that we just added. And under image processor select add load image (1). Choose the images paths (2). This is the path binding, returned by the repeater. Click select (3).
Then, right click the load image step. And add resize image (1). We want to resize our images, to 1200 pixels width. Enter the width. We leave the height to auto, as we want to keep the original proportions. Also, we keep the upscale option disabled. This way, only the images, wider than 1200 pixels, will be processed (2).
Right click the image resize step. And add save image (1). Select the path, where the images should be saved (2). Select the same folder, where your images are located (3).
And enable the overwrite option, in order to overite the original files, after resizing them (1). Save your action file (2). And now, create a server action executor (3). Add a name for this executor (4). Select to never auto run it, and then select your action file, from the dropdown (5). Click the ok button, when you are done.
And then select the button, which you want to use to resize the images. And add a new behavior. Select - control dmxzone server action executor.
And then, select to run your executor. Click the ok button, when you are done.
And you are done! Now all of your images, bigger than 1200 pixels, will be resized, when you click the resize button.