REST API - avoid random strings being appended to image names

Hi,

Currently when an integration updates a product with a PUT on the Products resource, it also includes the product images with the same src URL (image name) as before. This results in a random string being appended to the image name. What is the best way to avoid this from occurring while still allowing images to be updated when needed, keeping the same name?

My guess would be to use the ProductImages resource to GET the existing image ids, DEL each, and ProductImages POST or Products PUT the images with the same names as before. Is there a way to DEL all product images at once instead of individually?