fix base URL to use image document instead of context doc