public function deleteVariations(EventInterface $event) {
        $request = $event->getRequest();
        $user = $request->getUser();
        $imageIdentifier = $request->getImageIdentifier();

        try {
            $this->database->deleteImageVariations($user, $imageIdentifier);
        } catch (DatabaseException $e) {
            trigger_error(sprintf('Could not delete image variation metadata for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }

        try {
            $this->storage->deleteImageVariations($user, $imageIdentifier);
        } catch (StorageException $e) {
            trigger_error(sprintf('Could not delete image variations from storage for %s (%s)', $user, $imageIdentifier), E_USER_WARNING);
        }
    }