diff --git a/src/main.ts b/src/main.ts index 9dfb636..2bf2085 100644 --- a/src/main.ts +++ b/src/main.ts @@ -149,6 +149,13 @@ export default class BookTrackerPlugin extends Plugin { maintainAspectRatio: true, }); + if (file.extension !== "jpg") { + await this.app.fileManager.renameFile( + file, + file.path.replace(/\.[^.]+$/, ".jpg") + ); + } + return file; }