i'm trying to develop a very simple NodeJS server with EJS.
This little server have to render a little HTML page with just a line of text and a jpg file inside. 

Everyhing goes ok but the jpg file: this is not loaded by the server.

In the code i have specified express.static path but nothing to do.

I tried locally (on my 2 computers) and here, in my home, it's all ok. On the remote server the jpg has not been loaded.
I tried 2 different server of 2 different providers but the result it's the same.

This is my image.js file

```
const http = require("http")
var url = require("url")

const express = require("express");
const appExpress = express();
const router = express.Router();
const application_root = __dirname;
const application_port = 5000

appExpress.engine("html", require('ejs').renderFile);
appExpress.use("/", router);

appExpress.use(express.static(application_root + "/public"));

appExpress.get("*", function (req, res, next) {
  res.render((application_root + "/public/indice.html"), {})
  next();
});

// *********** CARICAMENTO PAGINA PRINCIPALE *************
function caricaPagina(res, tipologia_domande) {
    res.render((application_root + "/public/indice.html"), {})
}

appExpress.listen(application_port, (req, res) => {
    console.log(`Listening on port ${application_port}`);
})

```

This is my index.html file

```
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta charset="UTF-8">

    <title>Prova caricamento immagine</title>
</head>

<body>
  <div><img src="public/images/Sfondi/Slider.jpg"></div>
  Testo di prova per caricamento pagina
</body>

</html>

```

As you can see the project is very very simple and small but i'm going crazy about it :-(

Thanks to anyone will help me :-)

**\* UPDATE \*** 

I tried to run this code

```
appExpress.get('/', (req, res) => res.sendFile(application_root + '/public/images/Sfondi/Slider.jpg'));

```

This code it's ok and the image has been correctly loaded.
So it's not a path problem but rather an html loading problem.
Is there a res.render() problem with html and image file?

**\* UPDATE 2 \***

Ok, this is the situation:
if i use this code (with the sendFile function) the middleware **load the html page** loading the image but **does not execute** the javascript code inside the html page.

```
res.sendFile(path.join(__dirname + "/public/indice.html"), {path_image:path_image})

```

If i choose to use this code (res.render) the middleware **execute the javascript** inside the html page but **does not load** the image.

```
res.render((application_root + "/public/indice.html"), {path_image:path_image})

```

Anyone has some solution for this incredible problem? I read all the web but it seems i'm the only one to have this problem.

Thanks a lot :-)