public function deleteAction($productId, $mediaId)
    {
        /** @var Product $product */
        $product = $this->getProductRepository()->find($productId);
        if (!$product) {
            throw new EntityNotFoundException($this->getProductEntityName(), $productId);
        }

        $this->getProductMediaManager()->delete($product, [$mediaId]);

        $view = $this->view(null, Response::HTTP_NO_CONTENT);
        $this->getEntityManager()->flush();

        return $this->handleView($view);
    }