fileExtension = IMAGE_FILE_EXTENSION.PNG.getValue();
} else if (StringUtils.startsWith(dataURL, IMAGE_DATA_URI_SUFFIX.JPEG.getValue())) {
base64EncodedString = dataURL.replaceAll(IMAGE_DATA_URI_SUFFIX.JPEG.getValue(), "");
fileExtension = IMAGE_FILE_EXTENSION.JPEG.getValue();
} else {
throw new ImageDataURLNotValidException();
}
return new Base64EncodedImage(base64EncodedString, fileExtension);
}