Are you able to modify the code to capture the error php is giving?
I would agree it's likely to be related to the change to https, but can't be of much more help ... there will probably be a file path somewhere that is http and should now be https. See also:
https://www.php.net/manual/en/function.imagecreate.php
Stackoverflow is good for php help.