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

image load error handler #22

Closed
DaniSchenk opened this issue Oct 9, 2015 · 2 comments · Fixed by #1194
Closed

image load error handler #22

DaniSchenk opened this issue Oct 9, 2015 · 2 comments · Fixed by #1194

Comments

@DaniSchenk
Copy link

hey! first, i really like your plugin, thank you for sharing...
i was wondering, if there is any error handling callback in your options.
i tried replacing the src element of the #imagelightbox by a default error image (with the onLoadStart option), but the img#imagelightbox element will not be created if the loading process of the image src fails, right?

i would like to replace the img src of the lightbox image by a default image, if the src cannot be loaded.

@rejas
Copy link
Contributor

rejas commented Oct 25, 2015

Hi Devbors,
right now there is no errorcallback handling implemented, would be possible though by expanding the error function in line 214 with something. Is your js experience good enough to make that yourself (and send me a pullrequest) or wuld yu wait for me (or someone else) to add it?

@rejas rejas added this to the 1.0.0 milestone Jul 21, 2016
@paxperscientiam
Copy link
Collaborator

@DevbrosDevelopment @rejas I'm looking into implementing Promise, which can be used for this.

@rejas rejas removed this from the 1.0.0 milestone Dec 6, 2018
This was referenced Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants