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

[Avatar] Support cross origin in useImageLoadingStatus #3261

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

Conversation

ozgurozalp
Copy link

Description

Add crossOrigin Support to useImageLoadingStatus Hook

This PR adds crossOrigin support to the useImageLoadingStatus hook to handle images hosted on external domains that require specific crossOrigin settings (anonymous or use-credentials).

By including this option, we ensure broader compatibility with external image sources and resolve potential loading issues.

Note: I haven’t added a test for this as I’m not entirely sure how to approach testing this scenario.

@ozgurozalp
Copy link
Author

ozgurozalp commented Dec 19, 2024

@chaance can you review?

@ISnackable
Copy link

Nice, hopefully this gets merged soon, I'm having this exact issue as well.

Btw @ozgurozalp, I think you have to assign crossOrigin to the image variable before the image.src line, else it'll hit the cors error. See my image below.

CleanShot 2025-01-05 at 22 04 57

@ozgurozalp
Copy link
Author

Nice, hopefully this gets merged soon, I'm having this exact issue as well.

Btw @ozgurozalp, I think you have to assign crossOrigin to the image variable before the image.src line, else it'll hit the cors error. See my image below.

CleanShot 2025-01-05 at 22 04 57

Yes my friend, you may be right, I fixed that part too.

@naquiroz
Copy link

naquiroz commented Jan 13, 2025

@StephenHaney @vladmoroz @lucasmotta @hadihallak @chaance is there a chance that this PR can go in next release?

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.

3 participants