diff --git a/e2e/setup/serializers/image-snapshot.sharp.ts b/e2e/setup/serializers/image-snapshot.sharp.ts index 4a104dbf8..49e0045b9 100644 --- a/e2e/setup/serializers/image-snapshot.sharp.ts +++ b/e2e/setup/serializers/image-snapshot.sharp.ts @@ -38,6 +38,8 @@ export class SharpService { height: number, metadata: sharp.Metadata ): Promise => { + if (metadata.width === width && metadata.height === height) return image.toBuffer(); + const padX = Math.max(0, (width - metadata.width!) / 2); const padY = Math.max(0, (height - metadata.height!) / 2);