code: public static int getMaxImageSize() {
      int result = MAX_IMAGE_SIDE_SIZE_IN_PIXELS;
      try {
        final String defined = System.getProperty(PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE);
        if (defined != null) {
          LOGGER.info("Detected redefined max size for embedded image side : " + defined); //NOI18N
          result = Math.max(8, Integer.parseInt(defined.trim()));
        }
      } catch (NumberFormatException ex) {
        LOGGER.error("Error during image size decoding : ", ex); //NOI18N
      }
      return result;
    }
docs: Get max image size.
  
  @return max image size
  @see #MAX_IMAGE_SIDE_SIZE_IN_PIXELS
  @see #PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE