Get the SEO url for images from kirby api?

Kirby supports redirection of page URLs to the original content directory now.

You can use the following if you need URLs that don’t change after sorting (but please note that this will require a redirection every time the file is being accessed):

echo $file->page()->url() . '/' . $file->filename();

This is not recommended.