Skip to content

Home page image aspect ratio#51

Merged
kentcdodds merged 2 commits into
mainfrom
cursor/home-page-image-aspect-ratio-9583
Jan 31, 2026
Merged

Home page image aspect ratio#51
kentcdodds merged 2 commits into
mainfrom
cursor/home-page-image-aspect-ratio-9583

Conversation

@kentcdodds
Copy link
Copy Markdown
Member

@kentcdodds kentcdodds commented Jan 31, 2026

Adds an explicit aspect ratio to the home page hero image to prevent layout shift during initial page load.

Test Plan

Manually reload the home page (http://localhost:3000) and observe that the hero image reserves the correct space immediately, without layout shifts.

Checklist

  • Tests updated
  • Docs updated

Screenshots


Hero image reserves 3:2 space on load.

home-page-hero-image

Hero section with updated image ratio.

Open in Cursor Open in Web


Note

Low Risk
Small, presentation-only change to a single static image; minimal risk beyond potential unintended visual sizing differences.

Overview
Adds explicit width and height attributes to the marketing home page hero <img> (app/routes/_app+/_marketing+/index.tsx) so the browser can reserve space up front and avoid layout shift during initial render.

Written by Cursor Bugbot for commit 3dab2e2. This will update automatically on new commits. Configure here.

Co-authored-by: me <me@kentcdodds.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 31, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: me <me@kentcdodds.com>
@kentcdodds kentcdodds marked this pull request as ready for review January 31, 2026 16:25
@kentcdodds kentcdodds merged commit bc218b4 into main Jan 31, 2026
5 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

src="/images/smiling-phone-flowers.jpg"
alt="Smiling person holding flowers and a phone"
width={2560}
height={1707}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image aspect ratio attributes conflict with CSS class

Medium Severity

The added width={2560} and height={1707} attributes represent a 3:2 aspect ratio, but the CSS class includes aspect-square which enforces a 1:1 ratio. The CSS aspect-ratio property takes precedence over intrinsic dimensions, so these attributes won't achieve the stated goal of reserving 3:2 space during page load. The width/height values need to match the actual displayed ratio (1:1) for the layout shift prevention to work correctly.

Fix in Cursor Fix in Web

@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 31, 2026

Bugbot Autofix resolved the bug found in the latest run.

  • ✅ Fixed: Image aspect ratio attributes conflict with CSS class
    • Updated the image class to use the 3:2 aspect ratio so layout reservation matches the width/height attributes.

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.

2 participants