Giter Site home page Giter Site logo

heroku-buildpack-imagemagick-webp's Introduction

Heroku 20 + 22 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 buildpack works with BOTH Heroku stack heroku-20 and heroku-22.

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"
    }
  ],

Sample apps and demonstration

See folder test/sample_app for an example app and instructions for deploying it to heroku-22 or heroku-20 stacks.

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

heroku-buildpack-imagemagick-webp's People

Contributors

drnic avatar dilkhush avatar jhubert avatar albhaf avatar markedmondson avatar epicatization avatar

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.