Maybe there is a way to make the difference between a real failing request and a request indicating that the loading is in process, and make XWiki wait until it's done in that case.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.