Multi-language site url without language code


I have some global images that I use throughout the site. I want the url to be the same even when switching between languages.

<img src="<?= $site->url() ?>/assets/media/content/image.jpg">

When I switch language, the above results in a broken image:

<img src="">

With some testing I noticed that $site->url(’’) would fix the problem, is this the correct way to do it?

Final solution:

<img src="<?= $site->url('') ?>/assets/media/content/image.jpg">



1 Like

Thanks that worked!

1 Like