We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e35071a commit a868049Copy full SHA for a868049
components/og-image/getOgImage.js
@@ -1,15 +1,14 @@
1
+import { Jimp } from "jimp";
2
const { createHash } = require('crypto')
3
-var Jimp = require('jimp')
4
-
5
async function getOgImage({ title, user, type }) {
6
if (process.env.NODE_ENV === 'development') {
7
return 'og image will be generated in production'
8
}
9
10
const hash = createHash('md5').update(title).digest('hex')
11
12
- Jimp.read(`public/images/og/templates/${type}.png`, (err, image) => {
+Jimp.read(`public/images/og/templates/${type}.png`, (err, image) => {
13
if (err) throw err
14
15
Promise.all([
0 commit comments