Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e4cf682217 | |||
| e4fc8948fa |
@@ -142,7 +142,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
|||||||
if (buffer) {
|
if (buffer) {
|
||||||
// Load the image using Jimp
|
// Load the image using Jimp
|
||||||
Jimp.read(buffer, async (err, image) => {
|
Jimp.read(buffer, async (err, image) => {
|
||||||
if (image) {
|
if (image && !err) {
|
||||||
image?.resize(1280, Jimp.AUTO).quality(20);
|
image?.resize(1280, Jimp.AUTO).quality(20);
|
||||||
const processedBuffer = await image?.getBufferAsync(
|
const processedBuffer = await image?.getBufferAsync(
|
||||||
Jimp.MIME_JPEG
|
Jimp.MIME_JPEG
|
||||||
|
|||||||
Reference in New Issue
Block a user