Decoupled gallery size from image resolution.