update style!

This commit is contained in:
2026-07-24 16:40:28 +10:00
parent 66b529c748
commit 0d89072f57
+6 -3
View File
@@ -461,9 +461,12 @@
if (!img) return;
const box = img.getAttribute('data-box');
const timestamp = new Date().getTime();
// The API rejects dimensions below 300px; portrait cards: height >= width.
const width = Math.max(img.offsetWidth || 800, 300);
const height = Math.max(img.offsetHeight || 1200, width, 300);
// Request the same fixed high-resolution size used for the initial page
// load (600x800), regardless of the card's small on-screen CSS size —
// the .fan-card is only ~100-170px wide, so using img.offsetWidth/Height
// here fetched a much smaller/blurrier image than the initial fetch did.
const width = 600;
const height = 800;
const newUrl = `/api/images/random/${width}/${height}/?fit=crop&v=${timestamp}&box=${box}`;
const newImg = new Image();