Skip to content

Hide tiny images instead of scaling them up as hero/card artwork (#115) - #116

Draft
shellen wants to merge 1 commit into
mainfrom
fix/tiny-hero-images
Draft

Hide tiny images instead of scaling them up as hero/card artwork (#115)#116
shellen wants to merge 1 commit into
mainfrom
fix/tiny-hero-images

Conversation

@shellen

@shellen shellen commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Fixes #115.

Two layers:

  • Render-time dimension gate — new isTinyImage() (naturalWidth < 200 || naturalHeight < 100, covering favicons up to apple-touch-icon 180×180). The article hero, Rundown deck cards, dash cards, and section-featured images check it onload and fall back to their existing no-image treatment (hidden hero, initials/color block) instead of blowing the image up.
  • Pick-time filterlistFiles' first-body-image fallback skips favicon*/apple-touch-icon//favicons/ URLs so they never become card artwork in the first place.

Tests: new Playwright case (32×32 canvas image → hero hidden; 400×250 → hero stays) plus jest coverage for the pick-time skip. One existing source-shape test updated for the shared-fallback refactor it inspects. 178 jest + 3 e2e pass, typecheck clean.

Draft — hold for the next release (0.5.2) per rollout schedule; do not merge this week.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn

Small images — favicons, site logos, avatars — were being scaled up as
the article hero and as Rundown/dash card images whenever they were the
best candidate found. Fixes #115:

- New isTinyImage() helper; the hero and all card images check natural
  dimensions on load (<200px wide or <100px tall) and fall back to
  their existing no-image treatment instead of scaling up
- listFiles' body-image fallback skips favicon/apple-touch-icon URLs
  at pick time so they never become card artwork

Covered by a Playwright spec (canvas-generated 32x32 hidden, 400x250
kept) and jest tests for the pick-time filter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't blow up tiny images (favicons/logos/avatars) as the article hero

2 participants