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

Use Next.js image component instead of vanilla img element. #59

Open
Arsh1a opened this issue May 10, 2023 · 4 comments
Open

Use Next.js image component instead of vanilla img element. #59

Arsh1a opened this issue May 10, 2023 · 4 comments

Comments

@Arsh1a
Copy link

Arsh1a commented May 10, 2023

Is there a way to replace img element with Image component from Next.js?

@breadadams
Copy link
Contributor

+1, it would be great if you could provide a custom component (similar to the render props for header, next/prev buttons, etc) allowing users to render their own image element.

@breadadams
Copy link
Contributor

From taking a look at the code here this would mean moving the click/drag events and styling to a parent element, to keep things as simple as possible. I'm happy to put something together if it's welcome @tim-soft.

@tim-soft
Copy link
Owner

tim-soft commented May 18, 2023

@breadadams this would be a great addition to the library, not only to support next/image but also any arbitrary nodes -- it makes the lightbox a lot more flexible

what kind of api/prop change would you propose for this to work?

edit: PRs are always appreciated 👍

@trebeljahr
Copy link

+1 from me as well. This would be super awesome.

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

No branches or pull requests

4 participants