Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: added normalization to images added with the image tool to prevent MIME-mismatches (#10018)

Mossberg91c7748c3d58
diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx
index daeb44cefa..af888b1921 100644
--- a/packages/excalidraw/components/App.tsx
+++ b/packages/excalidraw/components/App.tsx
@@ -10461,7 +10461,10 @@ class App extends React.Component<AppProps, AppState> {
const initialized = await Promise.all(
placeholders.map(async (placeholder, i) => {
try {
- return await this.initializeImage(placeholder, imageFiles[i]);
+ return await this.initializeImage(
+ placeholder,
+ await normalizeFile(imageFiles[i]),
+ );
} catch (error: any) {
this.setState({
errorMessage: error.message || t("errors.imageInsertError"),