File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
packages/react-notion-x/src Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,18 @@ async function createPreviewImage(url: string): Promise<PreviewImage | null> {
33
33
try {
34
34
const { body } = await got ( url , { responseType : 'buffer' } )
35
35
const result = await lqip ( body )
36
- console . log ( 'lqip' , result . metadata )
36
+ console . log ( 'lqip' , { originalUrl : url , ... result . metadata } )
37
37
38
38
return {
39
39
originalWidth : result . metadata . originalWidth ,
40
40
originalHeight : result . metadata . originalHeight ,
41
41
dataURIBase64 : result . metadata . dataURIBase64
42
42
}
43
43
} catch ( err ) {
44
+ if ( err . message === 'Input buffer contains unsupported image format' ) {
45
+ return null
46
+ }
47
+
44
48
console . warn ( 'failed to create preview image' , url , err . message )
45
49
return null
46
50
}
Original file line number Diff line number Diff line change @@ -1048,6 +1048,10 @@ svg.notion-page-icon {
1048
1048
height : 100% ;
1049
1049
}
1050
1050
1051
+ .notion-bookmark-image span {
1052
+ max-height : 100% ;
1053
+ }
1054
+
1051
1055
.notion-column .notion-bookmark-image {
1052
1056
display : none;
1053
1057
}
You can’t perform that action at this time.
0 commit comments