Upgrading image gallery to 2.x version

relate to issue #1690