There is a workaround, by changing the image link format from:
https://github.com/org/repo/blob/master/images/XXX.png
to:
https://raw.githubusercontent.com/org/repo/master/images/XXX.png
For same page links, either the anchor method or heading method as discussed in the comments remains Ok. Additional discussion is here.