How to install php7.1-imagegd on Ubuntu

Image GD is now included as an apt-get extension for Ubuntu 14.04.4 LTS and 16.

sudo apt-get install php7.1-gd

Image GD is a PHP function used by many WordPress functions for managing images. You’ll need it to run any advanced WordPress web application properly.