nzbin / photoviewer

🖼️ A JS plugin to view images just like in Windows.
https://nzbin.github.io/photoviewer/
MIT License
356 stars 55 forks source link

Can you make the crossorigin attribute dynamic or remove it? #56

Closed Icoder9699 closed 2 months ago

Icoder9699 commented 2 months ago

Hi there! Can you please make the crossorigin attribute dynamic or remove it?

nzbin commented 2 months ago

May I ask what your problem is? Please check the PR #54 @souramoo

Icoder9699 commented 2 months ago

May I ask what your problem is? Please check the PR #54 @souramoo

When I use it across domains, the image doesn’t show up. Removing the crossorigin attribute from the tag resolved the issue.

For more details: I'm trying to preview an image on a GitHub domain, but the image source is on another domain. In this case, I receive the following error:

Access to image at X from origin 'Y' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

nzbin commented 2 months ago

I'm sorry, I don't find issues on the demo site (https://nzbin.github.io/photoviewer/). It's a GitHub domain and the images are on flickr.

Can you give me a image URL which throwing error?

Icoder9699 commented 2 months ago

I'm sorry, I don't find issues on the demo site (https://nzbin.github.io/photoviewer/). It's a GitHub domain and the images are on flickr.

Can you give me a image URL which throwing error?

I have sent the link to you via email.

also I temporarily resolved this problem with an older version of the package. in 3.9.1 all is good

nzbin commented 2 months ago

Thanks for your advice, new version 3.10.3 has fixed.

Icoder9699 commented 2 months ago

Thanks for your advice, new version 3.10.3 has fixed.

Thank you for promptly resolving the issue!