Giter VIP home page Giter VIP logo

alfred-imagemin's Introduction

alfred-imagemin

Minify images with Imagemin. 3 file formats supported. PNG, JPEG, GIF

minify-demo

Install

Requires the Alfred 3 or 4 Powerpack, Node.js 8+.

With NPM

Install with npm.

$ npm install --global alfred-imagemin

2020/12/07
Installation on npm will fail because of this issue.
Please install manually from here

Manually

download the workflow directly.

Usage

  1. Select images on finder.
  2. Open alfred and type imagemin and press the Enter key.
  3. Output minify images in optimized_images folder.

Configuration

You can set the compression rate and output dir with an environment variable.

name default value
JPEG_QUALITY 70 Option to imagemin-mozjpeg. Compression quality, in range 0 (worst) to 100 (perfect)
PNG_MAX_QUALITY 0.6 Option to imagemin-pngquant. Compression max quality, in range 0 to 1
PNG_MIN_QUALITY 0.5 Option to imagemin-pngquant. Compression min quality, in range 0 to 1
GIF_OPTIMIZATION_LEVEL 3 Option to imagemin-gifsicle. Select an optimization level between 1 and 3.
OUTPUT_DIR optimized_images Optimized image output directory name

Related

License

MIT ©

alfred-imagemin's People

Contributors

dependabot[bot] avatar kawamataryo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

75asa

alfred-imagemin's Issues

Adding resize/downscaling option

Hey Ryo!

Thanks for the nice workflow!

It would be really useful if the user could in addition to recompress also choose to downscale the image(s) like this:

Imagemin 640

which would resize the image, using the longest side of the image (width or height) and resize it to the resolution specified,
keeping the aspect ratio the same as the original so calculating the other side automatically based on that aspect ratio.

Or, if you want to use cjpeg only, at least have the possibility to scale as a percentage (supported by cjpeg natively) like this:

imagemin 1/2

would downscale it to half the res and so on...

It would be really useful!!!

Cheers Ryo!

[BUG] "cjpeg” cannot be opened because the developer cannot be verified.

Hi

I recently tried to run the Imagemin workflow for Alfred and I get a popup window with this error in it...

"cjpeg” cannot be opened because the developer cannot be verified.

Safari_2022-04-22_at_13 17 17

I'm running the following versions...

  • Alfred v4.6.4
  • Imagemin 1.4.0
  • MacBook Air (M1, 2020)
  • macOS Monterey v12.3.1

And when run this is the log output...

STDERR: Imagemin[[Run Script](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.D7604045-A449-45D7-BA82-486D600FE38B%3ED26018EE-ED09-4F7C-8010-E150093C4D65)] (node:65334) UnhandledPromiseRejectionWarning: Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:65334) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:65334) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Thanks for a great workflow and I hope it can be fixed as I really do find it useful.

Regards - Jason

Seems to not work anymore

This has served me so well for so long. Even after moving to Raycast, I still rely on this tool because it works better than any other. Today, it fails on all files. I'm not sure why. Is there any chance this can be ported to Raycast like you were able to with TinyPNG? Happy holidays!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.