mirror of
https://github.com/ZSCGR/CloudFlare-ImgBed.git
synced 2026-08-13 04:03:42 +08:00
fix: reject AVIF transforms on Pages
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user