Skip to content

Fix homepage "How It Works" images not loading and distorted aspect ratio - #634

Open
wolgwang1729 wants to merge 1 commit into
shopstr-eng:mainfrom
wolgwang1729:fix/homepage-pics-issue
Open

wolgwang1729 wants to merge 1 commit into
shopstr-eng:mainfrom
wolgwang1729:fix/homepage-pics-issue

Conversation

@wolgwang1729

Copy link
Copy Markdown
Contributor

Fix homepage "How It Works" images not loading and distorted aspect ratio

Description

The four step screenshots in the homepage "How It Works" section rendered as empty dark boxes, and once loading was restored they were visibly squashed. All changes are in pages/index.tsx:

  • Removed loading="lazy" from all 8 step images (dark + light variants). The attribute was introduced in 9c2380d ("Peformance, SEO, and GEO optimizations") as a performance tweak, but it was never really required here — these are small (~100–170KB) local static assets, so eager loading costs essentially nothing. Worse, it actively broke rendering: HeroUI's Image tracks load state via a detached new Image() preloader, and with loading="lazy" that preloader never fires onload for below-the-fold images, so data-loaded never becomes true and the visible <img> stays stuck at opacity-0 inside the skeleton wrapper.
  • Added removeWrapper + disableSkeleton (renders a plain <img>, same pattern already used in image-carousel.tsx , no skeleton/opacity trap, no stray wrapper div interfering with the hidden/dark: visibility classes).
  • Changed flex/dark:flex to block/dark:block (correct display for <img> elements).
  • Changed height={180} to height={437} on all 8 images to preserve the native 391:683 portrait ratio of the source PNGs at 250px wide (250 × 683/391 = 436.7).

Verified with eslint (clean), prettier --check (clean), tsc --noEmit (no new errors, only pre-existing ones in packages/shopstr-mcp), and confirmed all 8 src paths exist in public/ with matching case-sensitive filenames.

Screenshots (if applicable)

Before:
image

After:
image

Affirmation

Copilot AI lite review requested due to automatic review settings September 22, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Updates the homepage “How It Works” screenshots to load reliably and preserve their portrait aspect ratio.

Changes:

  • Removed lazy loading and skeleton wrappers.
  • Corrected display classes and image dimensions.
File Description
pages/​index.tsx Fixes homepage screenshot loading, visibility, and sizing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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