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

* fix: fixed a bug where a MIME-mismatch in an image would cause an error to update cache

* fix: fixed a bug where a MIME-mismatch in an image would cause an error to update cache

* normalize inside insertImages()

---------

Co-authored-by: Mårten Mossberg <marmo607@student.liu.se>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Mossberg
2025-09-24 18:30:50 +02:00
committed by GitHub
parent f738b74791
commit 91c7748c3d

View File

@@ -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"),