private URI buildGeneratedImagePath(ImageStyle imageStyle, URI uri) throws URISyntaxException {
   return new URI(
       uri.getScheme()
           + "://"
           + GENERATED_IMAGES_PATH
           + "/"
           + imageStyle.getKey()
           + uri.getPath());
 }
  @Override
  public Map<String, URI> getGeneratedImagesPaths(URI uri) throws URISyntaxException {
    Map<String, URI> generatedImages = new HashMap();

    for (ImageStyle imageStyle : imageStyles.values()) {
      generatedImages.put(imageStyle.getKey(), buildGeneratedImagePath(imageStyle, uri));
    }

    return generatedImages;
  }
  @Override
  public Map<String, URL> getGeneratedImagesUrls(URI uri) throws Exception {
    Map<String, URL> generatedImages = new HashMap();

    for (ImageStyle imageStyle : imageStyles.values()) {
      generatedImages.put(
          imageStyle.getKey(), fileService.getUrl(buildGeneratedImagePath(imageStyle, uri)));
    }

    return generatedImages;
  }