diff --git a/src/utils/app.js b/src/utils/app.js index 0c48404..10e602f 100755 --- a/src/utils/app.js +++ b/src/utils/app.js @@ -791,6 +791,9 @@ function normalizeImageFilename({name, type} = {}) { if (currentType !== type) { name = name.replace(new RegExp(`${currentExt}$`, 'i'), newExt); + } else if (!name.endsWith(currentExt)) { + // convert file extension to lowercase + name = name.replace(new RegExp(`${currentExt}$`, 'i'), currentExt); } } else { name = `${name}.${newExt}`;