Improve image deletion.