Same snippet containing images on multiple pages, but images don't always display

Hello!

I’m working on a site (development site found here) with a menu snippet that contains svg images:

The same snippet is used on almost every page of the site. The images load fine on any top-level page in the content folder, but in all child pages of the top-level pages, the images do not load:

Unsure if I’m missing something obvious. Any clues as to why this might be and how to fix it would be greatly appreciated!

You need to prepend the asset path with a slash to make it relative to the root URL.

Or use the url helper:

<img src="<?= url('assets/dist/img/control-arrow-01.svg') ?>" alt="">

Thanks for your reply! Tried this, but then the image didn’t load on any pages. Also tried full absolute paths with the same (original post) problem.

This works though, thank you!