I would like to show an image from a local directory through vaadin into the web browser. The reason behind this is because Java talks with R to, based on a user selection, generate a particular image which is stored in a local folder which vaadin can access it.
Then vaadin can read or access the image file and represent it to the browser.
However I only find some basic information on Vaadin 8 and images but this does not seem to work in Vaadin 10.
Image image1 = new Image("file://" + image, "");
image1.setWidth("240px");
image1.setHeight("240px");
image1.getStyle().set("borderRadius", "50%");
ui.access(() -> view.add(image1));
Are there other methods that needs to be applied before the image can be visualized?