Split avatar dimensions config read by types

This commit is contained in:
Cohee
2025-02-25 22:19:09 +02:00
parent 861c502e44
commit 4edb069bd8

View File

@@ -17,7 +17,10 @@ const quality = Math.min(100, Math.max(1, parseInt(getConfigValue('thumbnails.qu
const pngFormat = String(getConfigValue('thumbnails.format', 'jpg')).toLowerCase().trim() === 'png';
/** @type {Record<string, number[]>} */
const dimensions = getConfigValue('thumbnails.dimensions', { 'bg': [160, 90], 'avatar': [96, 144] });
const dimensions = {
'bg': getConfigValue('thumbnails.dimensions.bg', [160, 90]),
'avatar': getConfigValue('thumbnails.dimensions.avatar', [96, 144]),
};
/**
* Gets a path to thumbnail folder based on the type.