Tag gallery to terms.

Relate to issue #1870