updating gallery for responsive layouts