Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
page_to_pdf
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
page_to_pdf
Commits
258dad2e
Commit
258dad2e
authored
3 months ago
by
Andrea Kostakis
Committed by
Scott Euser
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3470485
by andreastkdf: Enforce 'eager' image loading
parent
c41fee9b
No related branches found
No related tags found
1 merge request
!10
#3470485: enforce "eager" loading style
Pipeline
#291381
passed with stages
in 3 minutes and 53 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
page_to_pdf.module
+3
-4
3 additions, 4 deletions
page_to_pdf.module
with
3 additions
and
4 deletions
page_to_pdf.module
+
3
−
4
View file @
258dad2e
...
...
@@ -177,10 +177,9 @@ function page_to_pdf_preprocess_responsive_image(&$variables) {
'page_to_pdf.node_pdf_revision_page_controller'
,
])
)
{
// Remove any lazy and other loading types to prevent page to
// pdf rendering issues in browserless/puppeteer render.
unset
(
$variables
[
'img_element'
][
'#attributes'
][
'loading'
]);
// Force all image loading to use 'eager' to avoid pdf rendering issues in
// browserless/puppeteer render.
$variables
[
'img_element'
][
'#attributes'
][
'loading'
]
=
'eager'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment