public function deleteImageAction(Request $request, $number)
{
$imageService = $this->container->get('image');
$em = $this->container->get('em');
$image = $em->getRepository('Newscoop\\Image\\LocalImage')->findOneById($number);
if (!$image) {
throw new EntityNotFoundException('Result was not found.');
}
$imageService->remove($image);
}