We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fb9f9e commit 3c71ca8Copy full SHA for 3c71ca8
utils/get-image-dimensions.js
@@ -32,8 +32,15 @@ const probeImage = async url => {
32
33
const getImageDimensions = async (url, description) => {
34
try {
35
- if (url.startsWith('data:'))
36
- throw new Error('Data URI images are not supported');
+ if (url.startsWith('data:')) {
+ console.warn(`
37
+ ---------------------------------------------------------------
38
+ Warning: Skipping data URL for image dimensions in ${description.substring(0, 350)}...
39
40
+ `);
41
+
42
+ throw new Error('Data URL');
43
+ }
44
let imageDimensions = getCache(url);
45
if (imageDimensions) return imageDimensions;
46
0 commit comments