diff --git a/links/templates/links/link_list.html b/links/templates/links/link_list.html index fc9e343..6790295 100644 --- a/links/templates/links/link_list.html +++ b/links/templates/links/link_list.html @@ -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();