@classmethod
def _images_succeeded(cls, session):
    """Clears the :attr:`_stored_images` set and deletes actual
        files that are marked as deleted in the storage
        if the ongoing transaction has committed.

        """
    for image, store in cls._deleted_images:
        for stored_image, _ in cls._stored_images:
            if (stored_image.object_type == image.object_type and 
                stored_image.object_id == image.object_id and stored_image.
                width == image.width and stored_image.height == image.
                height and stored_image.mimetype == image.mimetype):
                break
        else:
            store.delete(image)
    cls._stored_images.clear()
    cls._deleted_images.clear()
