From 64697f4c6a3ccbbd3006dfd4509b12fd20a8d779 Mon Sep 17 00:00:00 2001 From: Nolann Biron Date: Wed, 21 Jan 2026 21:25:19 +0100 Subject: [PATCH] Limit MAX_DPR to 3 in Image component Reduces the maximum device pixel ratio (DPR) from 4 to 3 in the Image component to align with the configuration in routes/image.ts. --- packages/gitbook/src/components/utils/Image.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/utils/Image.tsx b/packages/gitbook/src/components/utils/Image.tsx index 2675336cf..6e6ce8bf8 100644 --- a/packages/gitbook/src/components/utils/Image.tsx +++ b/packages/gitbook/src/components/utils/Image.tsx @@ -33,7 +33,11 @@ export type ImageResponsiveSize = { width: number; }; -const MAX_DPR = 4; +/** + * Maximum device pixel ratio (DPR) to generate in srcSet. + * Limit to 3 to align with routes/image.ts + */ +const MAX_DPR = 3; interface ImageCommonProps { /**