Usually php 5 and 7 have their own config files, so any extensions that you had enabled in 5 won't be included after an upgrade.
If you have shell access then you can write
Code
sudo nano /etc/php/apache2/php.ini
then hit ctrl+w to search, type gd.so and hit enter.
Delete the comment marker ; on the beginning of that line, hit ctrl+q then y to quit and save the file.
Depending on your setup the php.ini will be in a different subfolder, but it should be in either /etc/php or /etc/php7. There might be multiple php.inis so you would have to find the right file(s).
After you do changes in the config you have to restart your server process. That also depends on the server, but it's usually sudo systemctl restart httpd.service or type apache and hit tab to auto complete. Might even be nginx.