-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): default to local image component #1710
Conversation
🦋 Changeset detectedLatest commit: 27fcdb6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
10ee507
to
ac366d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to throw a PR up for https://www.catalyst.dev/docs/cdn-and-images.
if (height) { | ||
url = src.replace('{:size}', `${width}x${height}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Height isn't actually supported by the image loader, so opted to remove.
interface BcImageOptions { | ||
lossy?: boolean; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lossy is done through the API now, so we can omit this prop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have an ESLint rule to enforce the proper import I wonder if we should just call the component Image
instead of CatalystImage
since we call the link component Link
, not CatalystLink
🤔
Otherwise, LGTM 👍🏻
ac366d3
to
27fcdb6
Compare
Do we want to merge this into |
Can we just do a rebase onto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets merge this and we can rebase for other branches. 👍
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-3uaamzui1-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
I attempted to try and use the
images.loaderFile
fromnext.config.ts
but there are some internals that Next.js does with the build to replace all references to the default loader import. This causes infinite loops trying to import the definedloaderFile
.The PR makes the default image component
CatalystImage
which uses the default loader as a fallback.BcImage
was renamed toCatalystImage
.Testing