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

Lazily load viewer thumbnails #240

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

mikeapp
Copy link
Contributor

@mikeapp mikeapp commented Dec 14, 2024

Adds react-lazy-load-image-component and modifies src/components/Viewer/Media/Thumbnail.tsx to use it. I don't know anything about the source of the code other than it seems popular. Lazy loading was requested in issue #86.

Tested on a ~1200 page manifest ( https://collections.library.yale.edu/manifests/30675510 ) and performance seemed good on Mac Safari, Chrome, and Firefox. Could use further real-world testing on mobile devices.

Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mikeapp!

@mathewjordan mathewjordan merged commit 9164efb into samvera-labs:main Dec 16, 2024
1 check passed
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.

2 participants