public function deleteImageByName($filename)
    {
        $destinationPath = $this->getDestinationPath();

        $images = $this->getImages();

        foreach ($images as $key => $image) {
            if ($image->file == $filename) {
                foreach ($image->set as $imageSetFilename) {
                    $destination = $destinationPath . '/' . $imageSetFilename;
                    if (file_exists($destination)) {
                        unlink($destination);
                    }
                }
                unset($images[$key]);
            }
        }
        $images = array_values($images);
        $this->repository->images = $images;
        $this->save();
    }