before flat imagegrid