Returns resource file URL relative to the website resources directory.
The default resources directory location is
/resources, but it can be changed
on
System/Settings/CMS Settings page. This function resolves resource
file URLs taking into account the real location of the resources directory.
The following example outputs an image tag with
src attribute pointing
to a file in the resources directory. Using the resource_url() function guarantees
that the image is displayed even if the resources directory location is changed.
<img src="<?= resource_url('i/lemonstand_logo.png') ?>"/>