Don't use FlushGeneratedImageTask. It will "Remove all cached/generated images created as the result of an image manipulation" and "Actually clear out all the images".
All resized images inside HTMLEditors will be lost, because the path to the resized image is hardcoded in the image tag.
e.g.:
- You have "assets/Uploads/_resampled/ResizedImage200268-02.jpg" somewhere
- FlushGeneratedImageTask will remove all cached images
- "assets/Uploads/_resampled/ResizedImage200268-02.jpg" doesnt exists anymore
- edit "assets/Uploads/_resampled/ResizedImage200268-02.jpg" to "assets/Uploads/02.jpg" and save the DataObject
- a new "assets/Uploads/_resampled/ResizedImage200268-02.jpg" will be generated.