diff --git a/src/routes/upload.ts b/src/routes/upload.ts index 92a1569..e4a34c3 100644 --- a/src/routes/upload.ts +++ b/src/routes/upload.ts @@ -40,12 +40,12 @@ export class UploadRoute extends Route { if (req.session.userId) { if (profilePic) { try { - const fileBasename = this.getFileName() + ".png"; + const fileBasename = this.getFileName() + ".webp"; const filePath = path.join(this.dataDir, fileBasename); await sharp(profilePic.data) .resize(512, 512) .normalise() - .png() + .webp() .toFile(filePath); fileName = `/${dataDirName}/${fileBasename}`; const user = await User.findByPk(req.session.userId);