Code Monkey home page Code Monkey logo

heroku-imagemagick-buildpack's Introduction

heroku-buildpack-imagemagick-heif

The rise in popularity and use of HEIF/HEIC(High Efficency Image Format) means your project's image processing also needs to be able to handle this format. The current default version of imagemagick installed on heroku:22 dynos is a version 6.xx and does not support processing heic image files.

This Heroku buildpack vendors a version of ImageMagick with WEBP and HEIF support binaries into your project.

This one works was built for Heroku stack 20.

The tar file in the /build folder currently contains:

Version: ImageMagick 7.1.0-53

You will need to build a new binary if you want to use a newer or different version. To build a new binary see How to Build a New Binary

Usage

Step 1 : Adding the buildpack

From your projects "Settings" tab add this buildpack to your app in the 1st position:

https://github.com/yespark/heroku-imagemagick-buildpack

NOTE: _To ensure the newer version of imagemagick is found in the $PATH and installed first make sure this buildpack is added to the top of the buildpack list or at "index 1".

Step 2 : Clear the cache(Not Sure if this is necessary)

Since the installation is cached you might want to clean it out due to config changes.

heroku plugins:install heroku-builds
heroku builds:cache:purge -a HEROKU_APP_NAME

How to Build a New Binary (if you want to make somes changes)

The binary in this repo was built in a heroku:22 docker image running in a local dev environment. However, there is a script called build.sh made to build a tar file through docker easily, it will be copied to the build directory. Then you should commit this changes to your git, and adjust the buildpack url previously mentionned just above.

Prerequisites

  • Docker installed and running in local dev environment. Get Docker

Credits

License

The gem is available as open source under the terms of the MIT License.

heroku-imagemagick-buildpack's People

Contributors

guillaumewrobel avatar navidemad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

heroku-imagemagick-buildpack's Issues

Incompatibility with heroku-22 stack

After switching stacks, I'm seeing the following error:

error while loading shared libraries: libzip.so.5: cannot open shared object file: No such file or directory

This error happened in normal use, but the easiest reproduction is:

heroku run bash
identify -list format

I realize that this buildpack isn't built on the new stack yet, but I wanted to report the issue since the new stack will be of concern at some point.

Any license applicable?

Hello and thank you for your work!
I would like to use and possibly fork this buildpack, what license would apply here?

UnableToOpenConfigureFile `colors.xml'

When I run convert on some images I get this error:
convert: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/616.

I don't use other buildpacks

App broken after recent commits (imagemagick failing to install)

Hello,

Commits after #cc4d9b43252e2d7cedb8b7108c06cf5fbdffd0d1 have broken the app for us (commits that happened on 12/05). It looks like imagemagick fails to install. We're on heroku stack 20.

~ $ convert -identify
convert: error while loading shared libraries: libzip.so.4: cannot open shared object file: No such file or directory

Any help is greatly appreciated.

Error on Heroku deploy

I received the error "This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect"

I tried many ways to include imagemagick into my python project and many buildpacks. But it always throws this error when i'm using TextClip MoviePy on deployment.
The only buildpack that works for me is https://github.com/ello/heroku-buildpack-imagemagick. But it has problem with unicode textclip too. So I don't have any idea what's going on.

Can you help me? many thanks!

Error with 7.1.0-39

Rebuilt the Heroku app today and came across errors (below) ... setting the Heroku to use 7.1.0-25 buildpack fixes it.

Heroku Buildpack Link: https://github.com/yespark/heroku-imagemagick-buildpack#154c8c240df1d3fefe362221cac3ae4614e93ab0

Errors:

MiniMagick::Error: `magick convert /tmp/ActiveStorage-146013-20220621-3-2ytkha.jpg[0] -auto-orient -resize 250x250> /tmp/image_processing20220621-3-8o0w3g.jpg` failed with error:
convert: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/709.
convert: NoDecodeDelegateForThisImageFormat `JPEG' @ error/constitute.c/ReadImage/741.
convert: NoImagesDefined `/tmp/image_processing20220621-3-8o0w3g.jpg' @ error/convert.c/ConvertImageCommand/3325.

AVIF Support

Hi,

Thanks for the buildpack!

I'm checking to see what is needed to also support AVIF file formats. As I'm going through to create WEBP files I was looking to create AVIF as well.

Take care,
Charlie

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.