It is designed to be used with heroku-buildpack-multi to combine it with the appropriate real buildpack for your app.
Or even heroku added built-in multi buildpack support .
.buildpacks file to the root of your repo that contains this buildpack URL and your real buildpack URL:
heroku buildpacks:add https://github.com/yagainc/heroku-buildpack-jpegoptim
You can verify that everything is properly installed by running the following command:
$ heroku run "jpegoptim -V"
Copy the snippet above into CLI.