Skip to content

Commit b894dca

Browse files
kbrabrandstipsan
andauthored
fix: bump @sanity/image-url to fix rounding errors in crop rects (#132)
Co-authored-by: Cody Olsen <[email protected]>
1 parent 231f095 commit b894dca

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"dependencies": {
4141
"@sanity/client": "^2.23.2",
42-
"@sanity/image-url": "^0.140.22",
42+
"@sanity/image-url": "^1.0.1",
4343
"@sanity/mutator": "^2.33.2",
4444
"@types/url-parse": "^1.4.8",
4545
"axios": "^0.27.2",

test/__snapshots__/getGatsbyImageProps.test.ts.snap

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Object {
7575
"images": Object {
7676
"fallback": Object {
7777
"sizes": "(min-width: 70px) 70px, 100vw",
78-
"src": "https://cdn.sanity.io/images/projectId/dataset/bf1942-70x70.jpg?rect=0,8,70,53&w=70&h=53&auto=format",
79-
"srcSet": "https://cdn.sanity.io/images/projectId/dataset/bf1942-70x70.jpg?rect=0,8,70,53&w=70&h=53&auto=format 70w",
78+
"src": "https://cdn.sanity.io/images/projectId/dataset/bf1942-70x70.jpg?rect=0,9,70,53&w=70&h=53&auto=format",
79+
"srcSet": "https://cdn.sanity.io/images/projectId/dataset/bf1942-70x70.jpg?rect=0,9,70,53&w=70&h=53&auto=format 70w",
8080
},
8181
"sources": Array [],
8282
},
@@ -304,12 +304,12 @@ Object {
304304
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4238,2832&w=654&h=437&auto=format 654w,
305305
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=768&h=513&auto=format 768w,
306306
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=1024&h=684&auto=format 1024w,
307-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1366&h=912&auto=format 1366w,
307+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1366&h=912&auto=format 1366w,
308308
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=1600&h=1069&auto=format 1600w,
309-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1920&h=1282&auto=format 1920w,
309+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1920&h=1282&auto=format 1920w,
310310
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2048&h=1368&auto=format 2048w,
311311
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2560&h=1710&auto=format 2560w,
312-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4239,2832&w=3440&h=2298&auto=format 3440w,
312+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=3440&h=2298&auto=format 3440w,
313313
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=3840&h=2565&auto=format 3840w,
314314
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=4096&h=2736&auto=format 4096w,
315315
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=4240&h=2832&auto=format 4240w",
@@ -333,12 +333,12 @@ Object {
333333
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4238,2832&w=654&h=437&auto=format 654w,
334334
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=768&h=513&auto=format 768w,
335335
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=1024&h=684&auto=format 1024w,
336-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1366&h=912&auto=format 1366w,
336+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1366&h=912&auto=format 1366w,
337337
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=1600&h=1069&auto=format 1600w,
338-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1920&h=1282&auto=format 1920w,
338+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1920&h=1282&auto=format 1920w,
339339
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2048&h=1368&auto=format 2048w,
340340
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2560&h=1710&auto=format 2560w,
341-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4239,2832&w=3440&h=2298&auto=format 3440w,
341+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=3440&h=2298&auto=format 3440w,
342342
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=3840&h=2565&auto=format 3840w,
343343
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=4096&h=2736&auto=format 4096w",
344344
},
@@ -361,12 +361,12 @@ Object {
361361
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4238,2832&w=654&h=437&auto=format 654w,
362362
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=768&h=513&auto=format 768w,
363363
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=1024&h=684&auto=format 1024w,
364-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1366&h=912&auto=format 1366w,
364+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1366&h=912&auto=format 1366w,
365365
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=1600&h=1069&auto=format 1600w,
366-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4240,2831&w=1920&h=1282&auto=format 1920w,
366+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,1,4240,2831&w=1920&h=1282&auto=format 1920w,
367367
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2048&h=1368&auto=format 2048w,
368368
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=2560&h=1710&auto=format 2560w,
369-
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=0,0,4239,2832&w=3440&h=2298&auto=format 3440w,
369+
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?rect=1,0,4239,2832&w=3440&h=2298&auto=format 3440w,
370370
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=3840&h=2565&auto=format 3840w,
371371
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=4096&h=2736&auto=format 4096w,
372372
https://cdn.sanity.io/images/projectId/dataset/def456-4240x2832.webp?w=4240&h=2832&auto=format 4240w",

0 commit comments

Comments
 (0)