Load Image Error JSON.parse: unexpected non-whitespace character

Hi

I am creating a page to upload and process an image, I can get the file to upload to the directory ok but when I try to Load the image I get the following error

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 1095 of the JSON data
This is what I have in the file upload properties
image

The error on the web browser returns a 500 error see the error below

… {“code”:0,“file”:“C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\core\Path.php”,“line”:50,“message”:“Trying to access array offset on value of type null”,“trace”:"#0 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\core\Path.php(50): exception_error_handler(2, ‘Trying to acces…’, ‘C:\\wamp64\\www\\r…’, 50)\n#1 C:\wamp64\www\rotarioPhp\dmxConnectLib\modules\image.php(32): lib\core\Path::toSystemPath(NULL)\n#2 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\App.php(204): modules\image->load(Object(stdClass), ‘image1’, Array)\n#3 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\App.php(176): lib\App->execSteps(Object(stdClass))\n#4 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\App.php(144): lib\App->execSteps(Array)\n#5 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\App.php(133): lib\App->exec(Object(stdClass), false)\n#6 C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\App.php(111): lib\App->exec(Object(stdClass))\n#7 C:\wamp64\www\rotarioPhp\dmxConnect\api\volunteer\uploadProfileImage.php(8): lib\App->define(Object(stdClass))\n#8 {main}"}

( ! ) Fatal error: Uncaught TypeError: imagedestroy(): Argument #1 ($image) must be of type GdImage, null given in C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\image\Processor.php on line 25
( ! ) TypeError: imagedestroy(): Argument #1 ($image) must be of type GdImage, null given in C:\wamp64\www\rotarioPhp\dmxConnectLib\lib\image\Processor.php on line 25
Call Stack
# Time Memory Function Location
1 0.1698 502248 lib\image\Processor->__destruct( ) ...\Processor.php:0
2 0.1698 502248 imagedestroy( $image = NULL ) ...\Processor.php:25
...

The file properties look OK

Any idea what I’m doing wrong?

Make sure that you have the PHP GD extension turned on.