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.

Note:

  • 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.

Usage
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.

 

611187637_Screenshot2022-12-30at09_57_09.thumb.png.309ccf22f88538f41dc808495d859266.png

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

 

Download link

 

Stephen

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.

 

Stephen

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:

2135911298_Screenshotdefaultlength.png.5f3092b7dc3b21ee57c6f6be500691e9.png

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

1898050231_Screenshotdefaultpercent.png.3338e56d9c7e4c936bd6015b503284d4.png

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.

 

Stephen

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”).

 

Stephen

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...