diff --git a/src/inc/routes/halls.mjs b/src/inc/routes/halls.mjs index 79392d6..6c761e5 100644 --- a/src/inc/routes/halls.mjs +++ b/src/inc/routes/halls.mjs @@ -94,8 +94,7 @@ export default (router, tpl) => { const util = await import('util'); const execFilePromise = util.promisify(execFile); - // If only 1 or 2 items, just use what we have - await execFilePromise('magick', [...inputs, '+append', '-background', 'none', '-resize', '300x150^', '-gravity', 'center', '-extent', '300x150', cachePath]); + await execFilePromise('magick', [...inputs, '+append', '-background', 'none', '-resize', '600x300^', '-gravity', 'center', '-extent', '600x300', cachePath]); res.writeHead(200, { 'Content-Type': 'image/webp', 'Cache-Control': 'public, max-age=3600' }); return res.end(await fs.readFile(cachePath)); diff --git a/src/inc/routes/tag_image.mjs b/src/inc/routes/tag_image.mjs index 5c898ac..107a4dc 100644 --- a/src/inc/routes/tag_image.mjs +++ b/src/inc/routes/tag_image.mjs @@ -40,7 +40,7 @@ export async function regenerateTagImage(tag, mode) { const inputs = items.map(item => path.join(cfg.paths.t, `${item.id}.webp`)); await fs.mkdir(path.dirname(cachePath), { recursive: true }); - await execFilePromise('magick', [...inputs, '+append', '-background', 'none', '-resize', '300x150^', '-gravity', 'center', '-extent', '300x150', cachePath]); + await execFilePromise('magick', [...inputs, '+append', '-background', 'none', '-resize', '600x300^', '-gravity', 'center', '-extent', '600x300', cachePath]); return cachePath; } } catch (err) { @@ -123,17 +123,17 @@ function generateFallbackSvg(tag) { const n2 = parseInt(hash.substring(20, 22), 16); return ` - + - - - - ${displayTag} + + + + ${displayTag} `.trim(); } diff --git a/src/inc/routes/user_halls.mjs b/src/inc/routes/user_halls.mjs index 03c5aa4..214fbed 100644 --- a/src/inc/routes/user_halls.mjs +++ b/src/inc/routes/user_halls.mjs @@ -268,7 +268,7 @@ export default (router, tpl) => { await fs.mkdir(CACHE_DIR, { recursive: true }); await execFile('magick', [ ...inputs, '+append', '-background', 'none', - '-resize', '300x150^', '-gravity', 'center', '-extent', '300x150', cachePath + '-resize', '600x300^', '-gravity', 'center', '-extent', '600x300', cachePath ]); res.writeHead(200, { 'Content-Type': 'image/webp', 'Cache-Control': 'public, max-age=3600' }); return res.end(await fs.readFile(cachePath));