TECH / Servers & Websites 4 min read

WordPress Stopped Resizing Images to 600 px: the PHP GD Module Was Missing

Antonio NEMCD Author
Published Aug 27, 2019 · Updated Nov 13, 2026 · 4 min

At some point, after all my optimization and speed-up work on the blog, I noticed that WordPress had stopped resizing uploaded photos to 600 px and the other standard sizes: only the original ended up in the media library.

WordPress logo: fixing image resizing

I uploaded the sizes I needed by hand a few times and realized that wasn’t going to work – it had to be fixed. The cause turned out to be simple: after the switch to PHP 7.3, the server had no module for working with images.

Tracking down the problem

First, you need to remember what changed and what could have caused it.

I had tried several image compression plugins, and maybe they were to blame. I installed them, activated them, tested them and removed them. In theory, everything should have gone back to normal.

I also checked the WordPress settings themselves: Settings → Media. Everything was fine there too – the 600 px size was set.

WordPress media settings: 600 px size

Checking WordPress health

Then I remembered seeing a tab somewhere that lets you check the “health” of WordPress. I couldn’t find it on my site, so I turned to Google. It pointed me to a health check and troubleshooting plugin – Health Check & Troubleshooting.

In WordPress 5.2 and later this check is built in: Tools → Site Health. On older versions, the plugin does the job.

Install the plugin and see what it recommends. Some of the advice wasn’t very important, the other items were fine, and then there it was: when I moved to PHP 7.3, I forgot to install the GD module – in my case the php7.3-gd package.

The plugin also recommended 2 more modules that WordPress needs to work properly: bcmath and imagick.

Why there are no resized copies without GD

WordPress creates the resized copies (thumbnail, 600 px and other sizes) with PHP: it tries the Imagick extension first and falls back to GD. If neither is installed on the server, the image uploads without any error, but the sizes are simply never created. So after changing the PHP version, the first thing to check is that these modules are installed for the new version.

Installing the PHP modules (Debian)

On my server, PHP 7.3 runs on Debian 9 and comes from Ondřej Surý’s repository (packages.sury.org). There, every module is tied to the PHP version:

apt update
apt install php7.3-gd php7.3-bcmath \
  php7.3-imagick

If your PHP 7.3 comes from the standard Debian 10 repository, there is no php7.3-imagick package: Imagick is simply called php-imagick. With the wrong name, apt won’t find the package and won’t install anything from the line, so on Debian 10 the command is:

apt update
apt install php7.3-gd php7.3-bcmath \
  php-imagick

Check that the modules are loaded:

php -m | grep -Ei 'gd|imagick|bcmath'

Restart PHP-FPM:

systemctl restart php7.3-fpm

If PHP runs as an Apache module, restart Apache instead:

systemctl restart apache2

After that, image resizing in WordPress worked again!

What to do with photos you already uploaded

Images uploaded while the module was missing still have no resized copies. You can create them with the Regenerate Thumbnails plugin or with WP-CLI from the site folder:

cd /path/to/site
sudo -u www-data wp media regenerate \
  --only-missing

The --only-missing flag creates only the missing sizes and leaves the existing ones alone.

Need a VPS to practice on? On Vultr you can spin up a Debian server with hourly billing, try PHP and WordPress on it and delete it when you’re done (affiliate link).

Related posts:

Leave a Comment