Skip to content
A Github Action that will automatically compress images with mozjpeg
JavaScript Dockerfile Shell Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Builds are now handled by Dockerhub Sep 12, 2019
__tests__ Stats are marginally different on linux. This should be fun Aug 1, 2019
tests Added everything Apr 16, 2019
.gitignore Added everything Apr 16, 2019
Dockerfile Remove labels Sep 11, 2019
LICENSE Updated readme Sep 17, 2019
entrypoint.js Remove unused constant Aug 2, 2019
package-lock.json Merge branch 'master' of Aug 1, 2019
package.json Added tests for markdown generation and image processing output Jul 31, 2019

Image actions

Image actions will automatically compress jpeg, png and webp images in GitHub Pull Requests.

  • Compression is fast, efficient and near-lossless
  • Uses mozjpeg + libvips, the best image compression available
  • Runs in GitHub Actions, so it's visible to everyone
  • Configurable: Use the great defaults or change to suit your needs

Preview of image-actions pull request comment

How to add this to your repository:

  • Add the following steps to a workflow file found at: .github/workflows/calibreapp-image-actions.yml (If you don’t have one, create it.)
  • Paste in the following:
name: Compress images
on: pull_request
    name: calibreapp/image-actions
    runs-on: ubuntu-latest
      - uses: actions/checkout@master
      - name: calibreapp/image-actions
        uses: docker://calibreapp/github-image-actions
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The GITHUB_TOKEN secret is automatically managed by GitHub. You do not have to manually create this secret. This automatic token is scoped only to the repository that is currently running the action.


By default, you probably don’t need to configure image-actions. However, if you’d like to ignore certain file paths, or change image compression options, read on.

Configuration can be set by adding a .github/calibre/image-actions.yml file:

  quality: 80
  quality: 80
  quality: 80
  - "node_modules/**"

Links and resources

You can’t perform that action at this time.