Invalidating layout only after image change