Attachment to wiki document missing

Hm, it looks like server tries to load the attachment from the database.
I think the default is to look for attachments on the file system.

Two questions:
a) in the WEB-INF/xwiki.cfg there should be a property xwiki.store.attachment.hint. Normally this is commented out, like:

 # xwiki.store.attachment.hint=file

Is this the case for your installation, too?

b) in the WEB-INF/xwiki.properties there is a property

 # environment.permanentDirectory=/var/local/xwiki/

if this is commented out (as shown above) then I guess we are in trouble; XWiki then uses the temporary directory as a fallback; but this temporary directory might be cleaned if e.g. the server is restarted.
In that case you might need to look into backups if the temporary files are included. Otherwise the image file might be lost.

Edit: ah, I see this is also discussed in another thread: Wiki attachments are missing and cannot be deleted