This is a Heroku buildpack for vendoring the ImageMagick binaries built with webp support into your project.
This buildpack will download both libraries, build them from source, and install them along side your app. Your $PATH
and $LD_LIBRARY_PATH
will also be updated to use this version of ImageMagick instead of the default Heroku one, which does not currently have libwebp support.
Since this buildpack is building libwebp and ImageMagick from source your first deploy will take longer. However after building once the installed libraries are stored in a cache directory and will be used for all future deploys. If for any reason you want to force a rebuild of libwebp and ImageMagick you will need to Clear the cache.
In your project root:
heroku buildpacks:add https://github.com/mancrates/heroku-buildpack-imagemagick --index 1 --app HEROKU_APP_NAME
"index 1" means that imagemagick will be installed first.
You can verify that ImageMagick was built with libwebp support by running the following:
heroku run "identify -list format" --app HEROKU_APP_NAME
If the output includes WEBP* rw- WebP Image Format (libwebp x.x.x)
then you're all set.
- Determine the new version you want to use.
- Edit the
bin/compile
file and change out the version number. - Clear cache, as shown below, and redeploy your app to Heroku.
Since the installation is cached you might want to clean it out due to config changes. Check out the heroku-repo plugin.
heroku plugins:install heroku-repo
heroku repo:purge_cache -app HEROKU_APP_NAME