fix: some image loading
This commit is contained in:
@@ -15,12 +15,12 @@ interface Props {
|
||||
}
|
||||
|
||||
async function checkImage(image: ImageMetadata) {
|
||||
const src = image.src;
|
||||
const src = typeof image === "string" ? image : image.src;
|
||||
if (!src) return false;
|
||||
try {
|
||||
if (src.startsWith("/@fs") || src.startsWith("/_astro")) return true;
|
||||
const res = await inferRemoteSize(src);
|
||||
if (res.format) {
|
||||
console.log(res)
|
||||
image.format = res.format;
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user