Allow pngs

This commit is contained in:
Wizzard 2023-10-16 16:38:25 -04:00
parent 7d9800806a
commit 96634a7e9e
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ async function processAlbumCover(url) {
const imageSharp = sharp(imageBuffer);
const metadata = await imageSharp.metadata();
if (metadata.format !== 'jpeg' && metadata.format !== 'jpg') {
throw new Error('Not a JPEG image');
if (metadata.format !== 'jpeg' && metadata.format !== 'jpg' && metadata.format !== 'png') {
throw new Error('Not a supported image format');
}
const dominantColor = await getDominantColor(imageBuffer);