public Image addImage ( File file ) throws IOException { String contentType = ImageUtils . getContentType ( file ) ; String base64Content = ImageUtils . getImageAsBase64 ( file ) ; Image image = new Image ( file . getName ( ) , contentType , base64Content ) ; documentation . addImage ( image ) ; return image ; }
Adds an image from the given file to the workspace .