[SOLVED] Link to the file outside the public directory stops working

I have created a web application (Framework7 CLI), that is using pictures and videos outside the server’s public directory.
Everything worked well until I added routing with url (pushState = true)
When the pushState is enabled, the link to the file outside the public directory stops working …

can you help me?

some_file.f7.html

<img class="image-preview" src="getIcon.php?param={{some_server_path}}">

getIcon.php

$path = $_GET['param'];
$file = 'home/no_public_dir/imgs/'.$path;
$file_name = basename($path);

header('Content-Type: image/jpg');
header('Content-Disposition: attachment; filename="'.$file_name.'"');
echo file_get_contents($file);

This is a server-related question. I guess it can’t find getIcon.php? Then more likely you need to use absolute path from public root:

src="/getIcon.php?param={{some_server_path}}"

Thank You very much!