Basically, the issue is that you need a complete URL, including the scheme etc, for relative links within the html to work. A URL that is relative to the current class or the working directory will not work.
Assuming the html file and the associated image are bundled with the application (i.e. when you build a jar file for the application, the html file and image will be part of the jar file), then you can retrieve a URL for the html file with
getClass().getClassLoader().getResource("path/to/file.html");
where the path is relative to the classpath. You can then use toExternalForm() to convert to a String in the appropriate format. This is appropriate for html help pages, etc.
Here is an example:
HTMLTest.java:
package htmltest;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class HTMLTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
WebView webView = new WebView();
webView.getEngine().load(getClass().getClassLoader().getResource("htmltest/html/test.html").toExternalForm());
Scene scene = new Scene(webView, 600, 600);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
test.html:
<html>
<head><title>Test</title></head>
<body>
<h1>Test page</h1>
<img src="img/testImage.png"/>
</body>
</html>
testImage.png:

Project layout:
htmltest
- HTMLTest.class
- html
- test.html
- img
- testImage.png
Screenshot:

On the other hand, if you are genuinely loading the HTML file from the filesystem, you can create a File object for the HTML file, and then convert that to a URI. This would be appropriate, for example, if you were writing an HTML editor in which the user edited the HTML file and saved it to the file system, and you wanted to display the result in a web view; or alternatively if you prompted the user to load an HTML file with a FileChooser.
The code for this would look like:
File htmlFile = new File(...); // or get from filechooser...
webEngine.load(htmlFile.toURI().toString());