Best guess here.
strpos($this->src, substr($bmzConf['cachedir'], strlen($ihConf['dir']['docroot']))) === 0
The preceding basically says: "if the current src string begins with the same thing as the 'directory-docroot'."
To me that sounds like a /sever-relative/url, so I'm not sure if the line you have is what you need to change, but I can't see enough of the code to be sure.
What you might do if you find the URLs are server relative is add a check before the line you posted to see if it's an image file [either by directory EG /images/ or extension EG .gif] and pre-pend the location with an absolute URL prior to the preceding line.
What I'm thinking is something like:
// The rest of what it is you do here to display an image