Skip to content

feat: automatically add crossorigin attribute to preload link #1836

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sotasan
Copy link

@sotasan sotasan commented May 11, 2025

πŸ”— Linked issue

Resolves #1835

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

It fixes the following Chrome warning when setting a crossorigin attribute for external images:

A preload for 'XXX' is found, but is not used because the request credentials mode does not match.
Consider taking a look at crossorigin attribute.

@sotasan sotasan requested a review from danielroe as a code owner May 11, 2025 18:42
Copy link

pkg-pr-new bot commented May 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1836

commit: 3aabf3a

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.73%. Comparing base (9be356e) to head (3aabf3a).

Files with missing lines Patch % Lines
src/runtime/components/NuxtImg.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1836      +/-   ##
==========================================
- Coverage   62.75%   62.73%   -0.02%     
==========================================
  Files          77       77              
  Lines        3745     3746       +1     
  Branches      438      438              
==========================================
  Hits         2350     2350              
- Misses       1368     1369       +1     
  Partials       27       27              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Preload add crossorigin attribute
2 participants