if (contentType != null && contentType.startsWith("image/")) {
InputStream fileInput = file.getInputStream();
try {
ImageMetadataMap metadata = new ImageMetadataMap(fileInput);
List<Throwable> errors = metadata.getErrors();
item.getMetadata().putAll(metadata);
if (!errors.isEmpty()) {
LOGGER.info("Can't read image metadata!", new AggregateException(errors));