add callback: onImageIndexChanged(i)