I have created a small spring-boot application, which does nothing but implement a login-form.
When I open my browser on http://localhost:8080/login while running my application, a login.html page is loaded, which references a css file as follows:
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Login Form</title>
    <link href="css/login.css"  rel="stylesheet">
</head> 
The css form is loading an image as background:
body {
    background: url("../imgs/backgroundImage.jpg");
    background-size: cover;
}
All of this works fine. The background image, however, is loading a bit slow, slower than the login-form does. And this is unpleasant, which is why I want to change it. Since I cannot compress my image any further, I figured, maybe loading the image inside my html file would be a bit faster than referencing the external stylesheet. That's why I deleted the background-part from my external css file and included the following style-tag in the head of my login.html:
<style>
    body {
            background: url("static/imgs/backgroundImage.jpg");
            background-size: cover;
    }
</style>
And now the background image does not load at all. I don't understand why the image wouldn't show at all and I was hoping someone here could explain.
The resources are located in the following way:
resources
    static
        css
            login.css
        imgs
            backgroundImage.jpg
    templates
        login.html
 
     
     
     
    