Kirby 5 not displaying images

I have updated to Kirby 5. But forgot to delete the media folder (Install & update via download | Kirby CMS)

On my local set up, I visited the homepage and some of the images are not displaying. I then deleted the media folder and cleared my browser history, but the images are still not displaying. The images are in my home content folder. On first glance, other pages and images display fine.

My backup is also displaying fine. Why would the images in my home contents folder not display? These images are also not appearing in the media folder.

An example. Code from home.php template:

<img src="<?= url('/home/example.svg') ?>">

Is this because I forgot to delete the Media folder before looking at the homepage? Or in Kirby 5 can we not use the title ‘home’?

Turns out my code is wrong (it’s worked in Kirby 3 and 4 but not in 5).

Is this the correct way?


<img src="<?= $page->file('example.svg')?->url() ?>" alt="">