Skip to content

[6.x] Render PDF viewer pages lazily#14764

Merged
jasonvarga merged 12 commits into
statamic:6.xfrom
daun:feature/lazy-pdf-viewer
Jun 4, 2026
Merged

[6.x] Render PDF viewer pages lazily#14764
jasonvarga merged 12 commits into
statamic:6.xfrom
daun:feature/lazy-pdf-viewer

Conversation

@daun
Copy link
Copy Markdown
Contributor

@daun daun commented Jun 2, 2026

The PDF viewer currently renders all pages eagerly, freezing the asset editor ui for PDFs with 100+ pages.

This PR makes it so pages render lazily when they enter the viewport ± 200px. It also dynamically checks viewport scale to allow cheaper rendering on 1x where appropriate.

Before

Screenshot 2026-06-02 at 17 49 26

After

Screenshot 2026-06-02 at 18 51 06

@daun daun changed the title Render PDF viewer pages lazily [6.x] Render PDF viewer pages lazily Jun 2, 2026
jasonvarga and others added 2 commits June 4, 2026 11:38
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jasonvarga jasonvarga merged commit 2669921 into statamic:6.x Jun 4, 2026
18 checks passed
@daun daun deleted the feature/lazy-pdf-viewer branch June 4, 2026 15:56
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