Skip to content
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

fix(templates): prevent image priority and lazy loading incompatibility #10023

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

hkn-wt
Copy link
Contributor

@hkn-wt hkn-wt commented Dec 17, 2024

What?

This PR fixes an issue in the hero banner of website templates where priority props was passed to Media component but was incompatible with NextImage loading="lazy" causing error

Why?

To prevent error when displaying hero banners

How?

By adding a ternary condition of loading props passed to NextImage checking if priority prop is passed

@jacobsfletch jacobsfletch changed the title fix(templates): prevent priority and loading lazy incompatibility fix(templates): prevent image priority and lazy loading incompatibility Dec 17, 2024
@jacobsfletch jacobsfletch linked an issue Dec 17, 2024 that may be closed by this pull request
@jacobsfletch jacobsfletch enabled auto-merge (squash) December 17, 2024 14:56
@jacobsfletch jacobsfletch merged commit 7037983 into payloadcms:main Dec 17, 2024
19 checks passed
Copy link
Contributor

🚀 This is included in version v3.9.0

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