We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2381a12 + c6ae31f commit afb0409Copy full SHA for afb0409
src/utils/images.ts
@@ -1,6 +1,9 @@
1
import { isUnpicCompatible, unpicOptimizer, astroAssetsOptimizer } from './images-optimization';
2
import type { ImageMetadata } from 'astro';
3
import type { OpenGraph } from '@astrolib/seo';
4
+import type { ImagesOptimizer } from './images-optimization';
5
+/** The optimized image shape returned by our ImagesOptimizer */
6
+type OptimizedImage = Awaited<ReturnType<ImagesOptimizer>>[0];
7
8
const load = async function () {
9
let images: Record<string, () => Promise<unknown>> | undefined = undefined;
@@ -71,7 +74,7 @@ export const adaptOpenGraphImages = async (
71
74
};
72
75
}
73
76
- let _image;
77
+ let _image: OptimizedImage | undefined;
78
79
if (
80
typeof resolvedImage === 'string' &&
0 commit comments