docs: protected void addImagesToBook(final BuildData buildData, final String locale, final String imageFolder, boolean revertToDefaultLocale,
              boolean logErrors) {
          // Load the database constants
          final byte[] failpenguinPng = blobConstantProvider.getBlobConstant(
                  buildData.getServerEntities().getFailPenguinBlobConstantId()).getValue();
  
          // Download the image files that were identified in the processing stage
          float imageProgress = 0;
          final float imageTotal = buildData.getImageLocations().size();
          final int showPercent = 10;
          int lastPercent = 0;
  
          for (final TopicImageData imageLocation : buildData.getImageLocations()) {
              // Check if the app should be shutdown
              if (isShuttingDown.get()) {
                  return;
              }
  
              boolean success = false;
  
              final int extensionIndex = imageLocation.getImageName().lastIndexOf(".");
              final int pathIndex = imageLocation.getImageName().lastIndexOf("/");
              final int hypenIndex = imageLocation.getImageName().lastIndexOf("-");
  
              if (    /* characters were found */
                      extensionIndex != -1 && pathIndex != -1
                      /* the path character was found before the extension */ && extensionIndex > pathIndex) {
                  try {
                      /*
                       * The file name minus the extension should be an integer that references an ImageFile record ID.
                       */
                      final String imageID;
                      if (hypenIndex != -1) {
                          imageID = imageLocation.getImageName().substring(pathIndex + 1, Math.min(extensionIndex, hypenIndex));
                      } else {
                          imageID = imageLocation.getImageName().substring(pathIndex + 1, extensionIndex);
                      }
  
                      /*
                       * If the image is the failpenguin the that means that an error has already occurred most likely from not
                       * specifying an image file at all.
                       */
                      if (imageID.equals(BuilderConstants.FAILPENGUIN_PNG_NAME)) {
                          success = false;
                          buildData.getErrorDatabase().addError(imageLocation.getTopic(), ErrorType.INVALID_IMAGES,
                                  "No image filename specified. Must be in the format [ImageFileID].extension e.g. 123.png, " +
                                          "" + "or images/321.jpg");
                      } else {
                          final ImageWrapper imageFile = imageProvider.getImage(Integer.parseInt(imageID));
                          // TODO Uncomment this once Image Revisions are fixed.
  //                        if (imageLocation.getRevision() == null) {
  //                            imageFile = imageProvider.getImage(Integer.parseInt(imageID));
  //                        } else {
  //                            imageFile = imageProvider.getImage(Integer.parseInt(imageID), imageLocation.getRevision());
  //                        }
  
                          // Find the image that matches this locale. If the locale isn't found then use the default locale
                          LanguageImageWrapper languageImageFile = null;
                          if (imageFile.getLanguageImages() != null && imageFile.getLanguageImages().getItems() != null) {
                              final List<LanguageImageWrapper> languageImages = imageFile.getLanguageImages().getItems();
                              for (final LanguageImageWrapper image : languageImages) {
                                  if (image.getLocale().getValue().equals(locale)) {
                                      languageImageFile = image;
                                      break;
                                  } else if (revertToDefaultLocale && image.getLocale().getValue().equals(
                                          buildData.getDefaultLocale()) && languageImageFile == null) {
                                      languageImageFile = image;
                                  }
                              }
                          }
  
                          if (languageImageFile != null && languageImageFile.getImageData() != null) {
                              success = true;
                              addToZip(buildData.getBookLocaleFolder() + imageLocation.getImageName(), languageImageFile.getImageData(),
                                      buildData);
                          } else if (logErrors) {
                              buildData.getErrorDatabase().addError(imageLocation.getTopic(), ErrorType.INVALID_IMAGES,
                                      "ImageFile ID " + imageID + " from image location " + imageLocation.getImageName() + " was not found!");
                          }
                      }
                  } catch (final NumberFormatException ex) {
                      success = false;
                      if (logErrors) {
                          buildData.getErrorDatabase().addError(imageLocation.getTopic(), ErrorType.INVALID_IMAGES,
                                  imageLocation.getImageName() + " is not a valid image. Must be in the format [ImageFileID].extension e.g." +
                                          " 123" +
                                          ".png, or images/321.jpg");
                          log.debug("", ex);
                      }
                  } catch (final Exception ex) {
                      success = false;
                      if (logErrors) {
                          buildData.getErrorDatabase().addError(imageLocation.getTopic(), ErrorType.INVALID_IMAGES,
                                  imageLocation.getImageName() + " is not a valid image. Must be in the format [ImageFileID].extension e.g." +
                                          " 123" +
                                          ".png, or images/321.jpg");
                          log.debug("", ex);
                      }
                  }
              }
  
              // Put in a place holder in the image couldn't be found
              if (logErrors && !success) {
                  buildData.getOutputFiles().put(imageFolder + imageLocation.getImageName(), failpenguinPng);
              }
  
              final int progress = Math.round(imageProgress / imageTotal * 100);
              if (progress - lastPercent >= showPercent) {
                  lastPercent = progress;
                  log.info("\tDownloading " + locale + " Images " + progress + "% done");
              }
  
              ++imageProgress;
          }
      }