Easy. Create a button for removing the image
Give the click event for the button the code below:
ImageField1.rawValue = null;
Here is another tip in case you want to reset the form but keep the images.
Create a Reset Button and give the click event the code below:
//this code stores the image in a variable, resets the form and puts it back. Effectively not resetting the imagefield
var img; //create variable
img = ImageField1.rawValue; //give the variable the image that is in the ImageField
xfa.host.resetData(); //reset the form
ImageField1.rawValue = img; //restore the image field to the value(image) held in the variable.
![1298434_pastedImage_1.png 1298434_pastedImage_1.png](/t5/image/serverpage/image-id/7608iC46287275612A5A1/image-size/large?v=v2&px=999)