There is one fairly serious gotcha to this function. The function assumes you’re sending it an
absolute path, not a relative path. So ../../../web/images/profile.jpg isn’t going to match your document root in
any form or fashion. Fortunately, the code that generates the path to an image uses absolute paths. That means
that at least for your particular needs, this function works just fine.