updating image gallery js