Skip to content

Kirby 4.5.0

$kirby->url('media')

Returns the URL of the media folder

Example

<?= $kirby->url('media') ?>

Custom setup

If you want to overwrite the Url you can do this in your index.php by passing a custom Url setup to the Kirby constructor.

/index.php
<?php

include 'kirby/bootstrap.php';

$kirby = new Kirby([
    'urls' => [
        'media' => 'https://example.com/custom/url',
    ],
]);

echo $kirby->render();