if (image == null) {
throw new WebApplicationException(Status.NOT_FOUND);
}
ResponseBuilder response;
ImageLocation imageLocation = image.getLocation();
if (imageLocation.hasStored()) {
String cookie = imageLocation.getStored();
BlobData blob = imageDataService.getImageFile(cookie);
response = Response.ok().entity(blob.asEntity());