问题
I am developping an app using Heroku. I will need to manipulate images but unfortunately jpeg is not supported by default. I spoke with support and here is their answer:
"We unfortunately don't support jpeg by default. But the good
news is that we open sourced our PHP buildpack, so hopefully the
community will be able to bring that in.
In case you're interested, the buildpack is here:
https://github.com/heroku/heroku-buildpack-php"
I know I need to add --with-jpeg just before the --with-gd in the ./configure of PHP
But the buildpack only gives the ability to update the php.ini and compile files and none of them contains the magic line to update (./configure...) ...
Is there is a way to add jpeg support through the two mentioned files ?
回答1:
Current workaround is to install imagick.so - have compiled the library and instruction @ github https://github.com/alkhoo/heroku-cedar-php-extension
Also compiled apc.so since it is missing from Heroku's extension. The gd.so extension cannot be used since Heroku's PHP had GD compiled in php* binary. Waiting for someone to create a PHP buildpack without GD compiled.
Others have compiled zlib.so and mbstring.so (in case anyone is interested).
来源:https://stackoverflow.com/questions/9573916/how-can-i-add-jpeg-support-to-heroku-php-buildpack