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

feat: load all images on print #66

Merged
merged 3 commits into from
Nov 5, 2020
Merged

feat: load all images on print #66

merged 3 commits into from
Nov 5, 2020

Conversation

farnabaz
Copy link
Member

@farnabaz farnabaz commented Nov 4, 2020

Use window.matchMedia to detect print media query and load all images on the page.

close #56

@farnabaz farnabaz requested a review from pi0 November 4, 2020 11:55
return observer
}

function createObserver (intersectionOptions: object) {
Copy link
Member

Choose a reason for hiding this comment

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

I think for longer term it would be better to create observer directly in component instead of share runtime logic (createObserver(image))

Copy link
Member Author

Choose a reason for hiding this comment

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

If we move observer into component we are creating multiple query match and IntersectionOsberver. I'm not sure but it may reduce the performance

@farnabaz farnabaz merged commit 2c034de into master Nov 5, 2020
@farnabaz farnabaz deleted the printMatch branch November 5, 2020 11:27
procrates pushed a commit to procrates/nuxt-image that referenced this pull request Feb 21, 2023
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.

Load Images on Print
2 participants