image and showimage wrong index #2275

Fixed template tags image and showimage not looking for the right index in case image is an array.