Last active
January 10, 2024 22:19
-
-
Save ethanclevenger91/d9d6200e842baab36ae9c7bb3d1b0b86 to your computer and use it in GitHub Desktop.
ImageMagick w/ HEIC support on Laravel Forge - Recipe (PHP 8.0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minor tweaks from https://eplt.medium.com/5-minutes-to-install-imagemagick-with-heic-support-on-ubuntu-18-04-digitalocean-fe2d09dcef1 | |
sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list | |
apt-get update | |
apt-get -y install build-essential autoconf libtool git-core | |
apt-get -y build-dep imagemagick libmagickcore-dev libde265 libheif | |
cd /usr/src/ | |
git clone https://github.com/strukturag/libde265.git | |
git clone https://github.com/strukturag/libheif.git | |
cd libde265/ | |
./autogen.sh | |
./configure | |
make | |
make install | |
cd /usr/src/libheif/ | |
./autogen.sh | |
./configure | |
make | |
make install | |
cd /usr/src/ | |
wget https://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xf ImageMagick.tar.gz | |
cd ImageMagick-7* | |
./configure --with-heic=yes | |
make | |
make install | |
ldconfig | |
apt-get -y install php8.0-imagick | |
cd /usr/src/ | |
wget http://pecl.php.net/get/imagick-3.7.0.tgz | |
tar -xvzf imagick-3.7.0.tgz | |
cd imagick-3.7.0/ | |
apt-get -y install php8.0-dev | |
phpize | |
./configure | |
make | |
make install | |
phpenmod imagick | |
systemctl restart php8.0-fpm.service | |
php -r 'phpinfo();' | grep HEIC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment