File::stripBaseUrl() 

\nn\t3::File()->stripBaseUrl($file); 

Removes the URL if it corresponds to the current domain

Example:

\nn\t3::File()->stripBaseUrl('https://www.my-web.de/fileadmin/test.jpg'); ==> fileadmin/test.jpg
\nn\t3::File()->stripBaseUrl('https://www.other-web.de/example.jpg'); ==> https://www.other-web.de/example.jpg
Copied!

| @return string

Source Code 

public function stripBaseUrl($file)
{
	$baseUrl = \nn\t3::Environment()->getBaseURL();
	$file = str_replace($baseUrl, '', $file);
	return $file;
}
Copied!