Skip to content

Add a fallback when images cannot be loaded in cache #24

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: master
Choose a base branch
from

Conversation

bsautel
Copy link

@bsautel bsautel commented Jul 11, 2016

ImgCache uses XHR to load images. But XHR requests are constrained by the cross domain policy.

If images come from another domain and this domain does not implement CORS, they cannot be loaded for security reasons.

This pull requests adds a fallback to insert the image URL in the src attribute instead of letting the src attribute blank. Of course it won't be cached but in my use case it is better than displaying an image without src.

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.

1 participant