Skip to content

Commit 97618f0

Browse files
Merge pull request #200 from chrisreddington/bump-jimp
Bump Jimp to v 1.6.0
2 parents da8e98a + a868049 commit 97618f0

File tree

3 files changed

+312
-386
lines changed

3 files changed

+312
-386
lines changed

components/og-image/getOgImage.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1+
import { Jimp } from "jimp";
12
const { createHash } = require('crypto')
23

3-
var Jimp = require('jimp')
4-
54
async function getOgImage({ title, user, type }) {
65
if (process.env.NODE_ENV === 'development') {
76
return 'og image will be generated in production'
87
}
98

109
const hash = createHash('md5').update(title).digest('hex')
1110

12-
Jimp.read(`public/images/og/templates/${type}.png`, (err, image) => {
11+
Jimp.read(`public/images/og/templates/${type}.png`, (err, image) => {
1312
if (err) throw err
1413

1514
Promise.all([

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dayjs": "^1.11.10",
1515
"fathom-client": "^3.6.0",
1616
"gray-matter": "^4.0.3",
17-
"jimp": "^0.22.12",
17+
"jimp": "^1.6.0",
1818
"markdown-it": "^13.0.2",
1919
"next": "^14.2.10",
2020
"react": "18.2.0",

0 commit comments

Comments
 (0)