Issue most likely is within EnsureAssetContextIfRequired
@pkbullock : is this something you can have a look at? I'm aiming to get this fixed before the October drop as it's prevents image transfer from sub sites of a root site collection
I shall investigate and report back.
@jansenbe struggling to repro this, tried with SharePoint 2016, with the following:
Both transformed OK. Do you have more info on the scenario? My tests might be wrong.
@pkbullock : I can repro this in my 2013 lab, key here is that it's for a page in a sub site of the root site collection pointing to an image that lives in the root site collection. Sub sites in other site collections work fine. Things fail because when we create the context to load the asset it's returning the context for the sub site and not for the root site hosting the asset.
Thx for the fix @pkbullock , just merged so closing the issue