You say
"find the following code"
$pg_config = array(
'path' => str_replace('galleries/', '', str_ireplace(str_ireplace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT'])), '', $abs_prefix)),
'html_prefix' => str_ireplace(str_ireplace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT'])), '', $abs_file) . '/'
);
But, you don't tell me what to do with it.
Do I add this to the global.php file? If so, where?
I looked for that exact string on the whole site and couldn't find it.