We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4f104d commit 6e4d54bCopy full SHA for 6e4d54b
1 file changed
classes/Project/ProjectFactory.js
@@ -5,6 +5,7 @@ import Layer from "../Layer/Layer.js"
5
import dbDriver from "../../database/driver.js"
6
import vault from "../../utilities/vault.js"
7
import imageSize from 'image-size';
8
+import mime from 'mime-types';
9
10
const database = new dbDriver("mongo")
11
@@ -238,7 +239,7 @@ export default class ProjectFactory {
238
239
body: {
240
id: imageURL,
241
type: "Image",
- format: `image/${imageURL.split('.').pop()}`,
242
+ format: mime.lookup(imageURL) || "image/jpeg",
243
width: dimensions.width,
244
height: dimensions.height
245
},
0 commit comments