code: private List<GalleryFileHolder> convertToGalleryFileHolders(String contextPath, List<GalleryFile> galleryFiles) {
          List<GalleryFileHolder> galleryFileHolders = new ArrayList<>();
          for (GalleryFile oneGalleryFile : galleryFiles) {
              GalleryFileHolder oneGalleryFileHolder = new GalleryFileHolder();
              oneGalleryFileHolder.setFilename(oneGalleryFile.getActualFile().getName());
              oneGalleryFileHolder.setFreeSizePath(generateCustomImageUrlTemplate(contextPath, oneGalleryFile));
              oneGalleryFileHolder.setFormatPath(generateDynamicImageUrl(contextPath, oneGalleryFile));
              if (GalleryFileType.VIDEO.equals(oneGalleryFile.getType())) {
                  oneGalleryFileHolder.setVideoPath(contextPath + "/video/{conversionFormat}/" + oneGalleryFile.getPublicPath());
              }
              oneGalleryFileHolder.setContentType(oneGalleryFile.getContentType());
              galleryFileHolders.add(oneGalleryFileHolder);
          }
          return galleryFileHolders;
      }
docs: Converts the provided service layer {@link GalleryFile} objects to web
  model {@link GalleryFileHolder} objects.
  
  @param contextPath
  Webapp context path.
  @param galleryFiles
  List of gallery files.
  @return A list of gallery files holders