Skip to content

feat(screenshot): implement lazy load#61

Open
rakuzen25 wants to merge 7 commits into
gh-metrics:masterfrom
rakuzen25:feat/plugin-screenshot-lazy-load
Open

feat(screenshot): implement lazy load#61
rakuzen25 wants to merge 7 commits into
gh-metrics:masterfrom
rakuzen25:feat/plugin-screenshot-lazy-load

Conversation

@rakuzen25

Copy link
Copy Markdown

Add a lazy load option to the screenshot plugin to ensure that images are loaded.

Comment thread source/plugins/community/screenshot/index.mjs Dismissed
await page.goto(url, {waitUntil: ["domcontentloaded", "networkidle2"]})

await page.waitForSelector(selector)
if (lazyload) {
"height": 1280
}

plugin_screenshot_lazyload:
@github-actions

This comment has been minimized.

Signed-off-by: Frank <25704248+rakuzen25@users.noreply.github.com>
@lishaduck
lishaduck self-requested a review June 27, 2026 01:49

@lishaduck lishaduck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wins the hack of the year award but this is a pile of hacks atop hacks, LGTM.

@github-actions

This comment has been minimized.

@rakuzen25

Copy link
Copy Markdown
Author

Wins the hack of the year award but this is a pile of hacks atop hacks, LGTM.

Pretty sure that's the only way to realistically trigger intersection observers... Man some frontend stuff were just never designed with automation in mind.

@lishaduck

Copy link
Copy Markdown
Member

I just hate seeing a hardcoded "100ms", but I don't know that there's a better option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants