Various

Mass process and update a batch of images using GIMP

In various occasions, it is useful to update in one shot a batch of images. This operation takes a few minutes to setup using the Batch image manipulation plugin for the GIMPicon.

In only a few clicks, it is possible to update as many images as you want – resize, change format, …

First of all, download and install the GIMP Batch image manipulation plugin [1] – assuming, of course, that you already have installed the great GNU Image Manipulation Program, the GIMPicon [2]

You can then start The GIMPicon, and launch the Batch image manipulation plugin from GIMPicon File menu.

As an example, let’s optimize a batch of ~15 000 images of all kind (jpg, png, …), totalling ~1.5GB. Two operations will be necessary : resize the images, and save them in jpg format.

First step, resizing them. To do so, add a Resize action from the BIMP standard options (Fig 1). Select then your options – in my case, resize them all to 200 pixels wide, preserving their aspect ratios. (Fig 2)

BIMP, Batch Image Manipulation plugin for GIMP - select resize action
Fig 1 : BIMP, Batch Image Manipulation plugin for GIMP – select resize action
BIMP, Batch Image Manipulation plugin for GIMP - resize options
Fig 2 : BIMP, Batch Image Manipulation plugin for GIMP – resize options

Then, add a second action, change of format and compression (Fig 3). Here again, it is possible to select a few options (Fig 4) – the more important in this case being the quality. But feel free to play with the advanced paramaters and see what is working best for you.

BIMP, Batch Image Manipulation plugin for GIMP - select change format and compression action
Fig 3 : BIMP, Batch Image Manipulation plugin for GIMP – select change format and compression action
BIMP, Batch Image Manipulation plugin for GIMP - change format and compression action to jpg options
Fig 4 : BIMP, Batch Image Manipulation plugin for GIMP – change format and compression action to jpg options

Now that all actions are setup, select your images – one by one, or folder by folder (Fig 5). It took about 5 minutes to generate the list of my 15 000 images.

BIMP, Batch Image Manipulation plugin for GIMP - add image folders
Fig 5 : BIMP, Batch Image Manipulation plugin for GIMP – add image folders

Check the “Keep folder hierarchy” option in case you have subfolders. Your resulting images in your output folder will follow the same hierarchy. It is as simple as using a different folder in the web script, upload the pictures and the script, and it is done.

Finally, click on Apply, and wait for the magic to happen (Fig 6). In my example (~15 000 images, 1.5GB), it took about 45 minutes to complete the whole batch. This of course depends on processing power.

BIMP, Batch Image Manipulation plugin for GIMP - end of manipulation and success message
Fig 6 : BIMP, Batch Image Manipulation plugin for GIMP – end of manipulation and success message

Result is as follow : 1.5GB before batch resize and format / compression change (Fig 7), and 170MB after (Fig 8). This is how powerful and easy the GIMPicon is !

BIMP, Batch Image Manipulation plugin for GIMP - folder status before processing
Fig 7 : BIMP, Batch Image Manipulation plugin for GIMP – folder status before processing
BIMP, Batch Image Manipulation plugin for GIMP - folder status after processing
Fig 8 : BIMP, Batch Image Manipulation plugin for GIMP – folder status after processing

For example, this allowed me to pass the Google PageSpeed [3] test Optimize images [4] on a website, going up from a score of 17 on mobile (Fig 9) to 51 (Fig 10), and up from 35 (Fig 11) to 59 on desktop (Fig 12).

Google Page Speed - Score before image optimization of 17 on mobile
Fig 9 : Google Page Speed – Score before image optimization of 17 on mobile
Google Page Speed - Score after image optimization of 51 on mobile
Fig 10 : Google Page Speed – Score after image optimization of 51 on mobile
Google Page Speed - Score before image optimization of 35 on desktop
Fig 11 : Google Page Speed – Score before image optimization of 35 on desktop
Google Page Speed - Score after image optimization of 59 on desktop
Fig 12 : Google Page Speed – Score after image optimization of 59 on desktop