Skip to content
Snippets Groups Projects
Commit 258dad2e authored by Andrea Kostakis's avatar Andrea Kostakis Committed by Scott Euser
Browse files

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
......@@ -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';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment