image constructor javafx code example Example: javafx file to image Image image = new Image("file:" + path); // "file:src/resource/photo.jpg"