Libvips is a much more efficient alternative to ImageMagick. Now you are probably trying to deploy to Heroku, upload an image to test it and suprise! Your application crashed because libvips.so could not be found. Let’s fix this 😃

Go to your terminal and install Heroku Apt Builpack:

heroku buildpacks:add --index 1 heroku-community/apt

Then in the root directory of your rails repository create a file called Aptfile to install the required dependencies:

libglib2.0-0
libglib2.0-dev

Now deploy your application to heroku:

git push heroku main

As a final step you have to install the libvips library with this command:

heroku buildpacks:add --index 2 https://github.com/brandoncc/heroku-buildpack-vips

Deploy your application again and you are ready! 🥳