My absolute URL is linked to my public folder:
<img src="{{ absolute_url(asset('img/logo/image.jpg')) }}" alt="image"/>
It works fine like this, but in one case I need to load an image with an absolute URL but not to the public folder, instead, the image is in another folder that is on the same level then my public folder. I tried something like this:
<img src="{{ absolute_url(asset('../myfolder/private/image.jpg')) }}" alt="image"/>
But it is not working.
public
is your webroot, you can't access anything outside public
directly in your browser (and for good reasons, this means you can't read the source code of any application!)
If you want to make something from outside the public
directory available, either move it (or symlink) it into the public directory, create a new webroot, or write a custom Symfony controller to show the assets to your clients (make sure to have proper caching with the latter solution).