Try to used join table beetwen attachment and obserbation query.
I think there is video tutorial to do this on thin forum.