fix: reject AVIF transforms on Pages

This commit is contained in:
MarSeventh
2026-07-29 22:04:10 +08:00
parent 9ef8a3cca4
commit 7c5ec4463d
+9 -1
View File
@@ -273,7 +273,15 @@ function canTransformImageType(env, sourceType) {
return false;
}
return sourceType !== 'image/gif' || hasConfiguredStreamImageProcessor(env);
if (sourceType === 'image/gif') {
return hasConfiguredStreamImageProcessor(env);
}
if (sourceType === 'image/avif') {
return hasConfiguredImageProcessor(env);
}
return true;
}
function parseDimension(searchParams, name) {