Site icon Hip-Hop Website Design and Development

Image rotation and editing stopped working in WordPress after upgrading Ubuntu from 16.04 to 18.04

I’m seeing this error in WordPress Media editor:

“Image rotation is not supported by your web host.”

I checked on my server and I have php7-gd:

php -i | grep -i gd
/etc/php/7.2/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.2.5
GD library Version => 2.2.5
gd.jpeg_ignore_warning => 1 => 1

Does anyone know what could be a problem here?