The Automator app on Mac can be used to automate a wide variety of tasks to avoid mundane routine. For instance, it can be used to create a service to rename multiple files, resize multiple images, convert PDF to images, and a lot more.
In this article, we are going to demonstrate how you can use Automator to batch convert images from one image format (PNG) to another (JPEG). If you wish to convert to another format, you can choose your desired output format from the different options available.
Create Service to Convert Images from PNG to JPEG
1. First, open the Automator app, and click New Document on the dialogue box.
2. Next, in the ‘Choose a type for your document’ section, select ‘Quick Action’.
3. On the next screen, in the right pane, select ‘image files’ from the dropdown menu beside the ‘Workflow receives current’ option.
4. Now, let’s create a separate folder for the converted images. This is because, in case something goes wrong, you always have access to the original image. For this, on the leftmost pane, select ‘Files & Folders’, and beside it, on the right pane, select ‘New Folder’ and drag it into the workflow area on the right. Give the folder a name and location. For convenience, let’s call it ‘PNG to JPEG’.
5. Again, with ‘Files & Folders’ selected, click on ‘Get Folder Contents’ and drag it below the previous action in the workflow area.
6. Next, on the leftmost pane, select ‘Photos’, and from the right pane beside it, select ‘Change Type of Images’, drag it below the previous action, and on the pop-up, hit ‘Don’t Add’, since we are already saving the converted images in a different folder. Now, on the new action window, select ‘JPEG’ from the dropdown menu for ‘To Type’.
7. Finally, select ‘Save’ from the top menu or press command + s, and give a name to the service. For future reference, let’s call it ‘PNG-to-JPEG’.
Execute Service
1. To execute the service you just created, head over to the folder that contains the PNG image(s) you wish to convert.
2. Here, select all the images.
3. Now, control-click for a right-click, and from the ‘Services’, select (name of the service/PNG-to-JPEG) to execute it.
4. Once done, you will notice a folder appear on the Desktop or the location that you selected in Step-4.
Create Shortcut to Execute Service
Although the process for converting a PNG image to JPEG has minimized considerably with the service we just created, there is still the need to perform a few steps. Fortunately, there’s a way to avoid this by assigning a shortcut (key combination) for the service we created.
1. Open System Preferences and choose ‘Keyboard’.
2. Next, on the top bar in the dialogue box, select ‘Shortcuts’.
3. Now, in the left pane, select ‘Services’, and on the right pane, tap on the service we just created.
4. Upon clicking the service, you will see an ‘Add Shortcut’ option. Tap on it and enter a key combination that you want to use to trigger the service, the one that you can easily remember.
Now, to execute the service using the shortcut, navigate to the folder with the PNG image and select the images that you want to convert to JPEG. Once done, hit the key combination you assigned to the service. And that’s it! You should now see a folder pop-up with the JPEG equivalent for the PNG images.