don't use local/ for local media

Wouldn't it be more precise to use `parse_url` http://php.net/manual/en/function.parse-url.php to extract the scheme?