Commit 59e057f 1 parent d8aad39 commit 59e057f Copy full SHA for 59e057f
File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ function getFilePath(
37
37
return `data/images/${ type } /v1-${ fileName } -${ widthInfo } -${ heightInfo } -${ fit } .webp` ;
38
38
}
39
39
40
+ /**
41
+ * Inspired by Jacob Eybey's gist: https://gist.github.com/jacob-ebey/3a37a86307de9ef22f47aae2e593b56f
42
+ */
40
43
export async function loader ( { request } : LoaderFunctionArgs ) {
41
44
const url = new URL ( request . url ) ;
42
45
@@ -92,7 +95,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
92
95
}
93
96
const arrayBuffer = await res . arrayBuffer ( ) ;
94
97
95
- let sharpInstance = sharp ( arrayBuffer ) ;
98
+ const sharpInstance = sharp ( arrayBuffer ) ;
96
99
sharpInstance . on ( 'error' , ( error ) => {
97
100
console . error ( error ) ;
98
101
captureException ( error ) ;
You can’t perform that action at this time.
0 commit comments