Merge pull request #372 from linkwarden/dev

minor bug fixed
This commit is contained in:
Daniel 2023-12-29 10:53:41 -05:00 committed by GitHub
commit e4cf682217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
if (buffer) {
// Load the image using Jimp
Jimp.read(buffer, async (err, image) => {
if (image) {
if (image && !err) {
image?.resize(1280, Jimp.AUTO).quality(20);
const processedBuffer = await image?.getBufferAsync(
Jimp.MIME_JPEG