{"id":13582965,"url":"https://github.com/BenjaminOddou/alfred-smart-webp-compression","last_synced_at":"2025-04-06T18:31:44.433Z","repository":{"id":144139753,"uuid":"582754358","full_name":"BenjaminOddou/alfred-smart-webp-compression","owner":"BenjaminOddou","description":"🧙‍♂️ Transform your images into WebP format with ease","archived":false,"fork":false,"pushed_at":"2023-04-22T11:16:38.000Z","size":28471,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-05T23:41:24.831Z","etag":null,"topics":["alfred","alfred-workflow","cwebp","image-compression","image-processing","macos","shell","webp-converter","webp-images","zsh"],"latest_commit_sha":null,"homepage":"https://alfred.app/workflows/benjaminoddou/smart-webp/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenjaminOddou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-27T19:22:09.000Z","updated_at":"2024-06-04T11:44:44.000Z","dependencies_parsed_at":"2023-05-28T05:30:17.838Z","dependency_job_id":null,"html_url":"https://github.com/BenjaminOddou/alfred-smart-webp-compression","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminOddou%2Falfred-smart-webp-compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminOddou%2Falfred-smart-webp-compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminOddou%2Falfred-smart-webp-compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminOddou%2Falfred-smart-webp-compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenjaminOddou","download_url":"https://codeload.github.com/BenjaminOddou/alfred-smart-webp-compression/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247530956,"owners_count":20953879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfred","alfred-workflow","cwebp","image-compression","image-processing","macos","shell","webp-converter","webp-images","zsh"],"created_at":"2024-08-01T15:03:09.592Z","updated_at":"2025-04-06T18:31:44.130Z","avatar_url":"https://github.com/BenjaminOddou.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cimg src=\"public/icon_dark_mode.webp#gh-dark-mode-only\" alt=\"logo-dark\" height=\"55\"/\u003e\n\u003cimg src=\"public/icon_light_mode.webp#gh-light-mode-only\" alt=\"logo-light\" height=\"55\"/\u003e\n\n[![made with heart by Benjamin Oddou](https://img.shields.io/badge/made%20with%20%E2%99%A5%20by-benjamin%20oddou-62D895.svg?style=flat)](https://github.com/BenjaminOddou)\n[![saythanks](https://img.shields.io/badge/say-thanks-469C2C.svg?style=flat)](https://saythanks.io/to/BenjaminOddou)\n\nWelcome to the Alfred Smart WebP repository: **An Alfred Workflow** ✨\n\n## ✅ Prerequisites\n\n* MacOS\n* Alfred 5. Note that the [Alfred Powerpack](https://www.alfredapp.com/powerpack/) is required to use workflows.\n\n## 🏎️ cwebp\n\nUnder the hood, the compression is made with [cwebp](https://developers.google.com/speed/webp/docs/cwebp) (made by Google), a tool that allows to compress images into the WebP format, which is generally lighter, and broadly used to share images on the web.\n\n## ⬇️ Installation\n\n1. [Download the workflow](https://github.com/BenjaminOddou/alfred-smart-webp-compression/releases/latest)\n2. Double click the `.alfredworkflow` file to install\n\n## 🧰 Setup the workflow\n\n#### Open the Terminal of you Mac and run the following command:\n\nInstall cwebp (using [Homebrew](https://brew.sh)):\n\n```shell\nbrew install webp\n```\n\n## 🧙‍♂️ Invoke the workflow\n\nYou can invoke the workflow by writing `webp` into the Alfred search box. You can change this value by changing the `🕹️ Trigger` variable in workflow configuration panel.\n\n## 🤖 Usage of the workflow\n\n### Handling presets\n\n#### Create a preset\n\nGo under the `presets section` and click on `Add a new preset`.\n\nAdd your preset by putting a `value`, press ⏎ and input a `title` and a `subtitle` separated by a `/`.\n\n#### Modify a preset\n\nGo under the `presets section` and click on the preset you want to modify.\n\nSelect wether you want to modify the `title/subtitle` or the `value` and press ⏎. Input the new title/subtitle or value and press ⏎.\n\n#### Remove a preset\n\nUnder the `presets section`, click on `Remove a preset`.\n\nSelect the preset you want to remove and press ⏎.\n\n### Start the compression\n\n#### Using Workflow File Filter\n\nUnder the home menu, click on `Start the compression`.\n\nSelect the folder with images or directly the image you want to compress and press enter ⏎.\n\n\u003e Note that when selecting a folder, images within subdirectories aren't selected if `🔍 Depth of the search` is 1. If you want images in subdirectories, increase this value. Only images with `png|jpg|jpeg|tif|tiff|webp` file extensions are selected. In addition, they aren't case sensitive, meaning that the image extension can be `PNG|JpG|tifF...`\n\nHere is an example where the user selected a folder and put `Level 2` in `🔍 Depth of the search` :\n```shell\n.\n├── selected folder # Level 1\n│   ├── subdirectory # Level 2\n│   │   ├── image.PnG # selected ✅\n│   │   ├── a nested folder # Level 3\n│   │   │   ├── one image.webp # not selected ❌\n│   │   │   └── a second image.tiff # not selected ❌\n│   │   └── file.doc # not selected ❌\n│   └── first-image.jpeg # selected ✅\n```\n\nAlternatively, use the `Alfred Buffer` to select folder(s) and image(s) at the same time !! Basic commands are :\n\n* ⌥↑ to add a file to the buffer from Alfred's results.\n* ⌥↓ to add a file and move to the next item in your list of results.\n* ⌥← to remove the last item from the buffer.\n* ⌥→ to action all items in the buffer.\n* ⌥⌫ to remove all items from the buffer.\n\nTo know more on how to use `Alfred Buffer`, follow this [link](https://www.alfredapp.com/help/features/file-search/#file-buffer).\n\n\u003e Note that `Alfred Buffer` is preferred compare to the `{query}`, meaning that if you select a folder/image (by clicking on it or by pressing enter ⏎) that is not included in the buffer, **it will not be compressed**.\n\n![alfred_buffer](public/alfred_buffer.webp)\n\nChoose the cwebp options by selecting a preset or input it manually by pressing `Manual options`.\n\n#### Using Alfred Universal Actions\n\nSelect the folder(s) / image(s) you want to compress within alfred using `Quick Search` and run `Universal Actions` with → or ⌥→ if you used the `Alfred buffer`. Select \"Compress images to WebP\".\n\n![universal_action](public/universal_action.webp)\n\n\u003e Note that the workflow is type sensitive, meaning that if you select a file that is not part of the following types, the action \"Compress images to WebP\" will not be available\n\n![types](public/types.webp)\n\nIf you want to know more on how to use Alfred Universal Actions, follow this [link](https://www.alfredapp.com/help/features/universal-actions/).\n\n#### Logs output\n\nCheck the logs of your compression under the `Data folder`. The log file contains the 2 parts. \n\n1. In the orange box there is :\n\t* Date of the compression with a `YYYY/MM/dd` pattern.\n\t* Exact time of the compression with a `HH:mm:ss` pattern.\n\t* Folder(s) + image(s) path(s) selected with a tab ⇥ separator.\n\t* Preset or manual input. Preset will be displayed as `preset_name,preset_detail` whereas manual input will be displayed raw.\n\t* The selected level of variable `🔍 Depth of the search`\n2. In the green box there is the cwebp output.\n\n\u003e Note that each compression is separated by a line.\n\n![log_detail](public/log_detail.webp)\n\n## ⚖️ License\n\n[MIT License](LICENSE) © Benjamin Oddou\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBenjaminOddou%2Falfred-smart-webp-compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBenjaminOddou%2Falfred-smart-webp-compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBenjaminOddou%2Falfred-smart-webp-compression/lists"}