I looked through the source in /docs and didn't see any part that would dynamically rewrite the relative URL.  I also tried grunt docs, and it was still relative after the build.

I cringed when I first saw the hardcoded link too, but I think I understand now why it's done.  The images on angularjs.org probably don't change much, so even if you are technically pulling in a production image, everything still looks OK on staging.  On the other hand, since the header is in index.html (and not one of the ngdoc pages), it doesn't get built, so there's no opportunity in the current setup to rewrite that link.

Moreover, since the fallback is done in JS, we'd need a token (like `{{ IMAGES_PATH }}`) to be able to make sure the base URL was put in the correct place in both the `src` and `onerror` attributes.  Another option would be to use a `<base/>` tag in index.html.

Please let me know if I am mistaken, but I think what's best for now is to follow the existing convention and use the hard-coded link, unless there's an opportunity to let the build script handle it that I don't know about.