Problem
src/providers/storage/localStorageProvider.ts (lines 20–23) always appends .png to the output filename:
const filePath = path.join(outputDir, `${normalizedFileName}.png`);
const publicUrl = `${publicPathPrefix}/${normalizedFileName}.png`;
The GeneratedImage type has a mimeType field. If a future image provider returns image/jpeg or image/webp, the file would be saved with the wrong extension, corrupting the file type association.
Expected behavior
Derive the extension from image.mimeType:
image/png → .png
image/jpeg → .jpg
image/webp → .webp
Fall back to .png if the MIME type is unknown.
Files affected
src/providers/storage/localStorageProvider.ts
Problem
src/providers/storage/localStorageProvider.ts(lines 20–23) always appends.pngto the output filename:The
GeneratedImagetype has a mimeType field. If a future image provider returnsimage/jpegorimage/webp, the file would be saved with the wrong extension, corrupting the file type association.Expected behavior
Derive the extension from image.mimeType:
Fall back to .png if the MIME type is unknown.
Files affected
src/providers/storage/localStorageProvider.ts