Image annotations fix

This is the image annotation fix applied to the 0.11.x release. Don't merge before approved by @reidka