Changes for gallery image, digest api and digest template