Timber\ImageHelper::get_server_location PHP Method

get_server_location() public static method

Determines the filepath corresponding to a given URL
public static get_server_location ( string $url ) : string
$url string
return string
    public static function get_server_location($url)
    {
        // if we're already an absolute dir, just return
        if (0 === strpos($url, ABSPATH)) {
            return $url;
        }
        // otherwise, analyze URL then build mapping path
        $au = self::analyze_url($url);
        $result = self::_get_file_path($au['base'], $au['subdir'], $au['basename']);
        return $result;
    }