Jump to content

Shrink JPEG/PNG file(s)

Recommended Posts

This workflow, which works as a Universal Action both on a single selected JPEG or PNG file and on multiple selected JPEG or PNG files:

  • saves each original image in a temporary folder specified in the User Configuration;
  • offers two methods of resizing the dimensions of each selected image: either to the default longest side measurement specified in the User Configuration (measured in pixels) or by the default percentage reduction specified in the User Configuration.


  • The workflow does not enlarge images that already have a shorter longer side than specified in the User Configuration.
  • If you specify a default percentage in the User Configuration greater than 99 the workflow will produce an error message notifying you of that.

Important note
If you use the default backup folder in the User Configuration the backup is to a temporary folder which is:

  • automatically created if it does not exist; and
  • automatically deleted when your Mac restarts.

If you need to retrieve a backup you must move it from that default temporary folder before your Mac restarts.

Select a single JPEG or PNG file, or multiple JPEG or PNG files, in Finder, use your Universal Actions hotkey and choose `Shrink JPEG/PNG file(s)` to run the workflow.



@TomBenz in the sense this will deal with multiple files it addresses your request here.


Download link



Link to comment

Thank you Stephen. I will try and provide feedback.


Is it possible to also change resolution of images? I have a design word document with screenshots and I would like to reduce resolution as well as dimension and then copy them. Are there other workflows that address this? 



Link to comment
52 minutes ago, TomBenz said:

Are there other workflows that address this?

I'm afraid I don't know the answer to that question. You might look, however, at Optimize Images in the Alfred Gallery. (I've not tried it and you'll have to assess whether it might help with what you need.)


I'm not currently inclined the complicate further my own workflow by trying to introduce an option to change the resolution of images (even were that to be easily possible, which I suspect it is not), sorry.



Link to comment

Version 2.0 has a small, but significant, usability improvement. You can now select, in the User Configuration, the default resizing method (either by longest side or by percentage). The only effect that has on the workflow is in the first dialog (i.e., whichever default method you choose the other method is still available in the workflow).


In the default configuration the first dialog appears like this:


If you un-check Default resizing method in the User Configuration the first dialg appears like this:


Although the change is small if you use one method regularly it speeds use of the workflow—enabling you to dismiss any dialog simply by pressing <Enter> on the default choice.



Link to comment
  • 4 months later...
  • 3 weeks later...

If you look at the workflow configuration (click on Configure Workflow… when in Workflows in Alfred preferences, and looking at this workflow) there are detailed instructions about use of the workflow under the Usage section.


But, yes, you must select the relevant file or files first in finder and then use your Universal Action hotkey.


Edit: to make it perfectly clear, the workflow is a Universal Action and is not triggered by a keyword (e.g., "shrink”).



Edited by Stephen_C
Further clarification
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...