4D Write Pro brings good news with 4D v18 R2: deleting inline or anchored pictures can now be done in a snap! Say hello to the new command, WP DELETE PICTURE.
So how to proceed? Simply retrieve the picture you want to delete by its ID (using WP Get element by ID) or by its position (using WP Get elements), then call the command. Voilà!
Delete picture by its ID
$pictRef:=WP Get element by ID(WParea;"Logo")
WP DELETE PICTURE($pictRef)
Delete all inline pictures from the header
$header:=WP Get header(WParea;1)
$_pictures:=WP Get elements($header;wk type image)
For each ($pictRef;$_pictures)
WP DELETE PICTURE($pictRef)
End for each
More examples can be found in the HDI above and the full documentation can be read here!