Skip to content

TRAC-238: Update PDP metadata images to use correct image url - #3174

Open
jordanarldt wants to merge 1 commit into
canaryfrom
TRAC-238
Open

TRAC-238: Update PDP metadata images to use correct image url#3174
jordanarldt wants to merge 1 commit into
canaryfrom
TRAC-238

Conversation

@jordanarldt

@jordanarldt jordanarldt commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What/Why?

ProductPageMetadataQuery requested urlTemplate, which returns a URL containing a literal {:size} placeholder. <Image> expands that through the CDN loader at render time, but generateMetadata uses the value verbatim — so og:image pointed at an unfetchable URL.

url(width: 1200) returns a concrete URL instead. Height is omitted deliberately: the stencil resizer fits the image inside the given box rather than cropping, so asking for a social aspect ratio like 1200x630 would just return a smaller square image for a square product photo.

Testing

View source on a PDP and confirm og:image contains /stencil/1200w/ rather than /stencil/{:size}/, and that the URL loads.

Migration

In core/app/[locale]/(default)/product/[slug]/page-data.ts, update the defaultImage selection in ProductPageMetadataQuery:

  defaultImage {
    altText
-   url: urlTemplate(lossy: true)
+   url(width: 1200, lossy: true)
  }

Also included as a ## Migration section in the changeset.

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b12c5ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview Aug 13, 2026 6:33pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 0c49112 (2026-08-13).

No bundle size changes detected.

@github-actions

Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 93 92 94

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 71 78 72 76
Accessibility 95 92 95 98
Best Practices 100 100 100 100
SEO 88 100 88 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 5.0 s 5.6 s 4.4 s 6.7 s
CLS 0.04 0 0.037 0
FCP 1.2 s 1.5 s 1.2 s 1.2 s
TBT 10 ms 10 ms 0 ms 0 ms
Max Potential FID 60 ms 60 ms 50 ms 40 ms
Time to Interactive 5.1 s 5.7 s 4.4 s 6.7 s

Full Unlighthouse report →

defaultImage {
altText
url: urlTemplate(lossy: true)
url(width: 1200, lossy: true)

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.

Is 1200 a little too big? Can we request it at a smaller url?

Also, won't this affect the page query as well? I can't remember if the product image carousel utilizes this image?

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