Menu
_binaryDad;
  • Me
  • Resume
_binaryDad;

Install ImageMagick for PHP 7.4 on Ubuntu 18.04

Posted on August 9, 2021August 11, 2021 by Ryan

Long story short, my fiance just got a new Galaxy S21 Ultra. Yes, the one with the 108MP camera. That means we’re getting pictures that are 20-40MB in size in most cases. Of course, that increased picture size causes issues with uploading and image post-processing in WordPress. I was getting the following error even for uploading a single image:

Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.

It seemed the fix was to use ImageMagick to handle the post-processing. In my case, I’m running Ubuntu 18.04 with PHP 7.4 FPM. Installing ImageMagick using the regular apt process apparently installs the module for PHP 7.2. Fortunately, after some digging, I’ve managed to get it running:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php7.4-imagick
sudo service php7.4-fpm restart

This is day 3 of #100DaysToOffload.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Fixing large image upload timeouts on WordPress
  • Install ImageMagick for PHP 7.4 on Ubuntu 18.04
  • It’s a Proud Day
  • Amazon S3 .NET SDK File Code Example
  • Joining (large) rooms in Matrix/Synapse is a pain

Categories

  • Biking
  • Code
  • Homelab
  • Kids
©2022 _binaryDad; | Powered by WordPress & Superb Themes