Fix homepage "How It Works" images not loading and distorted aspect ratio - #634
Open
wolgwang1729 wants to merge 1 commit into
Open
wolgwang1729 wants to merge 1 commit into
wolgwang1729 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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'sImagetracks load state via a detachednew Image()preloader, and withloading="lazy"that preloader never firesonloadfor below-the-fold images, sodata-loadednever becomestrueand the visible<img>stays stuck atopacity-0inside the skeleton wrapper.removeWrapper+disableSkeleton(renders a plain<img>, same pattern already used inimage-carousel.tsx, no skeleton/opacity trap, no stray wrapper div interfering with thehidden/dark:visibility classes).flex/dark:flextoblock/dark:block(correct display for<img>elements).height={180}toheight={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 inpackages/shopstr-mcp), and confirmed all 8srcpaths exist inpublic/with matching case-sensitive filenames.Screenshots (if applicable)
Before:

After:

Affirmation