Simple enough question, but one which is proving difficult to find a solution to.
Quick preamble - the situation this is addressing is a MU network using sitewide tags plugin which pulls all network posts to the main site's home page, then timthumb is used to scale the images of each post which are retrieved using a custom get_first_image function. The usual problem occurs whereby the image retrieved by the get function has a relative path rather than the absolute URL needed by timthumb, hence I run it through a filter to reconstruct the absolute URL. All works fine except blog_id always equals '1' for every post. This is clearly because the blog_id on which the function runs upon (i.e. the main parent blog) is '1' and therefore I need to determine the blog_id for the original post and use this when reconstructing the absolute URL.
Can anyone help?
I have tried using the wordpress function,
get_blog_id_from_url but there's very little guidance or examples on its use. I have also tried variations of
$GLOBALS['current_site']->blog_id, but I have been so far unable to return any blog_id value except 1.