It seems it is sometimes necessary to use the '?raw=true' parameter, mentioned on the "In issues, pull requests and comments of another repository" line of the table, even if the image linked to is in the same repository as the issue or pull request. Add it to the example in the line "In issues, pull requests and comments of the repository" also.