resolveResizeImagesConfig (kits/storage-resize-images/src/export-config.ts:186) does toArray(config.imageTypes) ?? [DEFAULT_IMAGE_TYPE] with no validation. A stale .env from before #3064 carries IMAGE_TYPE=["False"], and that value does not fail the resize: resize-image.ts:103 treats it as a format because "False" !== "false", SUPPORTED_IMAGE_CONTENT_TYPE_MAP["False"] is undefined, the output is written as <name>_<size>.False with contentType: undefined (served as application/octet-stream), and the run reports success. Reproduced against the kit's bucket stub.
The extension has the same gap (functions/src/config.ts:85) but its YAML never stored False, so this is stricter than parity, hence a follow-up rather than part of #3064.
Proposed fix: add validateImageTypes() beside validateAbsolutePathList in export-config.ts, accepting "false" plus every key of SUPPORTED_IMAGE_CONTENT_TYPE_MAP (src/global.ts:29-39, so jpg/tif/jfif stay legal for library consumers) and throwing Invalid image type: <value> otherwise. Do not throw in convertType: tests/convert-image.test.ts:91-101 pins pass-through for unsupported formats such as raw, matching the extension's util.ts:247. Tests: reject ["False"], accept every map key, and route the existing multiSelect audit in tests/config.test.ts through resolveResizeImagesConfig. README differences section should note the kit rejects unknown imageTypes values where the extension passed them through.
Raised in #3064 review by @IzaakGough.
resolveResizeImagesConfig(kits/storage-resize-images/src/export-config.ts:186) doestoArray(config.imageTypes) ?? [DEFAULT_IMAGE_TYPE]with no validation. A stale.envfrom before #3064 carriesIMAGE_TYPE=["False"], and that value does not fail the resize:resize-image.ts:103treats it as a format because"False" !== "false",SUPPORTED_IMAGE_CONTENT_TYPE_MAP["False"]isundefined, the output is written as<name>_<size>.FalsewithcontentType: undefined(served asapplication/octet-stream), and the run reports success. Reproduced against the kit's bucket stub.The extension has the same gap (
functions/src/config.ts:85) but its YAML never storedFalse, so this is stricter than parity, hence a follow-up rather than part of #3064.Proposed fix: add
validateImageTypes()besidevalidateAbsolutePathListinexport-config.ts, accepting"false"plus every key ofSUPPORTED_IMAGE_CONTENT_TYPE_MAP(src/global.ts:29-39, sojpg/tif/jfifstay legal for library consumers) and throwingInvalid image type: <value>otherwise. Do not throw inconvertType:tests/convert-image.test.ts:91-101pins pass-through for unsupported formats such asraw, matching the extension'sutil.ts:247. Tests: reject["False"], accept every map key, and route the existing multiSelect audit intests/config.test.tsthroughresolveResizeImagesConfig. README differences section should note the kit rejects unknownimageTypesvalues where the extension passed them through.Raised in #3064 review by @IzaakGough.