Skip to content

derencius/heroku-buildpack-imagemagick-webp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku buildpack for Imagemagick 7.1, webp, and heif

This is a Heroku buildpack for vendoring the ImageMagick with WebP and HEIF support binaries into your project.

This one works with Heroku stack heroku-20.

Usage

Add this buildpack to your app:

heroku buildpacks:add https://github.com/drnic/heroku-buildpack-imagemagick-webp -i 1 -a <app name>

And add it into your app.json:

  "buildpacks": [
    {
      "url": "https://github.com/drnic/heroku-buildpack-imagemagick-webp"
    },
    {
      "url": "heroku/ruby"
    }
  ],

How it works?

When you use this buildpack it unpacks a pre-built build/imagemagick.tar.gz file into your Heroku application's /./vendor folder and sets up the relevant environment variables.

If you were to run a Heroku bash session you can investigate the dependencies:

$ heroku run -a <appname> bash

~ $ convert -version
Version: ImageMagick 7.1.0-22 Q16-HDRI x86_64 2022-01-29 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): bzlib djvu fontconfig freetype heic jbig jng jpeg lcms lqr lzma openexr png webp x xml zip zlib
Compiler: gcc (9.3)

~ $ dwebp -version
1.2.2

~ $ heif-info -h
 heif-info  libheif version: 1.12.0

Build script

To update the dependencies you have the following steps:

  1. Update the Dockerfile

  2. Re-build the build/imagemagick.tar.gz file

    ./build.sh
    
  3. Git the changes, including the tar.gz file, and push to your fork

  4. Purge your Heroku application's cache

    heroku builds:cache:purge
    
  5. Redeploy your application via the Heroku dashboard, or push a new commit.

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 53.7%
  • Shell 46.3%