Skip to content

Commit 1e8db6d

Browse files
committed
Add TODO in Image_Prioritizer_Background_Image_Styled_Tag_Visitor
1 parent ed3aa4c commit 1e8db6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ private function get_common_lcp_element_external_background_image( OD_URL_Metric
143143
private function maybe_preload_external_lcp_background_image( OD_Tag_Visitor_Context $context ): void {
144144
// Gather the tuples of URL Metric group and the common LCP element external background image.
145145
// Note the groups of URL Metrics do not change across invocations, we just need to compute this once for all.
146+
// TODO: Instead of populating this here, it could be done once per invocation during the od_start_template_optimization action since the page's OD_URL_Metric_Group_Collection is available there.
146147
if ( ! is_array( $this->group_common_lcp_element_external_background_images ) ) {
147148
$this->group_common_lcp_element_external_background_images = array();
148149
foreach ( $context->url_metric_group_collection as $group ) {

0 commit comments

Comments
 (0)