public function imageWithMetadataAction(ImageInterface $image) { $this->response->setHeader('Content-Type', 'application/json'); $imageProperties = $this->getImageInterfacePreviewData($image); return json_encode($imageProperties); }