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

Expose a prop to allow a custom placeholder image #86

Open
jingdid opened this issue Feb 1, 2023 · 8 comments
Open

Expose a prop to allow a custom placeholder image #86

jingdid opened this issue Feb 1, 2023 · 8 comments
Assignees
Labels
feature request New feature or request

Comments

@jingdid
Copy link

jingdid commented Feb 1, 2023

Is your feature request related to a problem? Please describe.
Hello! Sorry to bother you again, but I would like to be able to display a custom image when the provided src url in the images array turns out to be a broken link. Right now it looks like the carousel deals with this case, but the placeholder image must be the one in the library. Since I can't provide image components directly (unless I use children which in this case, I would prefer not to), I have to defer to the carousel's custom error handling in case the url is not found, but I would like my fallback to be a bit more descriptive than the black rectangle currently provided as the library's fallback.

Describe the solution you'd like
It would be nice if there was a prop provided so that I can use a custom placeholder image.

Describe alternatives you've considered
I've looked into whether I can customize the placeholder image without requesting this feature, but ironically, because this library provides a fallback image, I can't simply add a css rule that only kicks in for broken images, and the lack of direct control over images unless I use the children prop severely limits any other options.

Additional context
Thank you!

@yifaneye
Copy link
Owner

yifaneye commented Feb 1, 2023

Hi @jingdid ! Thank you for raising this issue!

That's a good idea! I will try to support a custom placeholder image.

@yifaneye yifaneye self-assigned this Feb 1, 2023
@yifaneye yifaneye added the feature request New feature or request label Feb 1, 2023
@jingdid
Copy link
Author

jingdid commented Mar 1, 2023

Hey! Just wanted to ask if you have any idea when this feature might get added?

@yifaneye
Copy link
Owner

Hi @jingdid ! I think I have time next month. So I think it will be available at the end of April. Feel free to make a pull request.

@jingdid
Copy link
Author

jingdid commented Mar 24, 2023

Hi @yifaneye ! Thanks for the response! I will look into making a pull request but am not certain that I will be able to do so before next month.

@yifaneye
Copy link
Owner

You're welcome. No worries.

@jingdid
Copy link
Author

jingdid commented May 23, 2023

Hey, thank you for reviewing my pull request, and apologies for not commenting sooner! I will be offline for a few weeks starting this Friday, so I probably won't be able to address most of your feedback until I get back, but I will aim to at least get started before I leave.

@yifaneye
Copy link
Owner

Hi @jingdid ! My pleasure! You did a great job! Thank you very much for your support and contribution! No worries!

@jingdid
Copy link
Author

jingdid commented Aug 11, 2023

@yifaneye Sorry for the bother, but I've updated the pull request to hopefully address your feedback. Any thoughts on when you might be able to re-review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants