Emerging insulin resistance is normally compensated by increased insulin production of pancreatic β-cells, thereby maintaining normoglycemia. However, it is unclear whether this is achieved by adaptation of β-cell function, mass, or both. Most importantly, it is still unknown which of these adaptive mechanisms fail when type 2 diabetes develops. We performed longitudinal in vivo imaging of β-cell calcium dynamics and islet mass of transplanted islets of Langerhans throughout diet-induced progression from normal glucose homeostasis, through compensation of insulin resistance, to prediabetes. The results show that compensation of insulin resistance is predominated by alterations of β-cell function, while islet mass only gradually expands. Hereby, functional adaptation is mediated by increased calcium efficacy, which involves Epac signaling. Prior to prediabetes, β-cell function displays decreased stimulated calcium dynamics, whereas islet mass continues to increase through prediabetes onset. Thus, our data reveal a predominant role of islet function with distinct contributions of triggering and amplifying pathway in the in vivo processes preceding diabetes onset. These findings support protection and recovery of β-cell function as primary goals for prevention and treatment of diabetes and provide insight into potential therapeutic targets.