site: thumbnails are upscaled 2-4x in the cards view and on the entry strip, and the entry strip image is lazy-loaded although it is the LCP element
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript
- Bereich
- frontend, performance
Rechercherichtung
Start with site/lib/cards.mjs:33, site/lib/entry-page.mjs:107-108, and the card sizing rules at site/public/styles.css:1797-1798; compare how thumbnails are rendered in list, cards, and entry views. Check site/thumbs.mjs for source selection and lib.test.mjs for relevant coverage. Done means thumbnails stay within 1.5× their natural width, entry images above the fold load eagerly, and tests cover small thumbnails and the eager option.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Why it matters
The view toggle is the headline of the site refresh. Switching a list-default category (Audio, Fonts, Tools, Video) to Cards turns small publisher images into a blurry smear, which reads as a broken site rather than a licence-gated preview. On the 192 entry pages with a preview, that image is the largest element above the fold and loading="lazy" makes the browser wait for layout before requesting it, the classic LCP regression.
Evidence (at 69387df, local build served at 375x667 and 1440x900)
- Cards upscaling: on
/category/audio/at 375 px, list view renders the first thumb at 56x56 from a 160x120 source; after clicking Cards the same<img>renders at 341x213 CSS px (682x426 device px at DPR 2).site/lib/cards.mjs:33emits one<img width height loading="lazy">for both views;site/public/styles.css:1797-1798forcesaspect-ratio: 16 / 10. About 15 stored thumbs are under 400 px wide. - Entry strip: on
/entry/kenney/, the LCP candidate isIMG.entry-thumb-img; its request starts only afterstyles.cssfinishes, and the element hasloading === "lazy".site/lib/entry-page.mjs:107-108reusesthumbHtml()fromcards.mjs:33, which hard-codesloading="lazy" decoding="async". The 600x300 source is laid out 870 CSS px wide at 375 px (DPR 2), nearly 3x upscaled.
Suggested approach
In cards.mjs, treat t.width < 400 as "small": render the card thumb with object-fit: contain on the surface colour (the list style) or fall back to the typographic placeholder in cards view only. Give thumbHtml an { eager } option used by the entry strip (loading="eager" fetchpriority="high") and add <link rel="preload" as="image"> to the entry head. Cap the strip at twice its natural width with object-fit: contain. In site/thumbs.mjs, prefer the larger of og:image and twitter:image when the chosen one is under 400 px.
Done when
No thumb is drawn above 1.5x its natural width; no entry page has a lazy image above the fold; lib.test.mjs covers the small-thumb branch and the eager option.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 58
- Forks
- 15
- Ø Merge
- 16 Std. 53 Min.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TMHSDigital/Free-Game-Dev-Assets
-
community marketing priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community marketing priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Free-Game-Dev-Assets#150 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community enhancement priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
TMHSDigital/Free-Game-Dev-Assets#149 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community documentation priority: medium
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
TMHSDigital/Free-Game-Dev-Assets#148 ·
Maintainer antworten meist innerhalb von 1 Tag
-
site: the Unreal guide is missing from the homepage Guides list, and the hero calls tools "assets"Offenbug marketing priority: medium
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
TMHSDigital/Free-Game-Dev-Assets#147 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TMHSDigital/Free-Game-Dev-Assets
Ähnliche Issues
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
melodic-software/claude-code-plugins#9619 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug Frontend P2-medium UI UX
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
Deepak3699/Ai_Mentor#427 ·
Maintainer antworten meist innerhalb von 1 Tag
-
resource.reload() while params is in error switches the resource to 'idle' instead of retryingOffenarea: core
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
venn: a name that starts with set-, union-, text- or style- followed by a letter is a parse errorOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
obsidianmd/pele#65 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
11ty/buildawesome#4407 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag