I am not 100% sure, but I believe that in some instances the image may try to load within the quote, there are successful examples of this in Kiwifarms, but when for some reason it cannot load it, something goes array in the quoting process, or other motives (such as image being too large, being deleted, etc), it may display the image-icon with the red cross.
The intended behaviour for Xenforo as I understand it, is to only display "View attachment (image ID number)" as a link, when inside quotes.