In Versoin 2.3.3 of GD library for php, the GD2 image support has been disabled, you have to custom compile your own php version to enable this support
libgd/libgd#428
the call to imagegd2($gdImage) in function gdImageToBinaryData($gdImage) function no longer works, resulting
Warning: imagegd2(): GD2 image support has been disabled
Please replace with imagejpeg($gdImage) instead of imagegd2