I get the Exception:
pdfinfo: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
on the line
images = pdf2image.convert_from_path("filename.pdf")
I tried adding this buildpack, but it didn't solve the problem.
had the same issue and solved it as follows:
Aptfile
in the root directory of your project and add libpng-dev
and poppler-utils
to the fileheroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt