Skip to content

Clear Critical Images on site logo change on pages using it as LCP #6795

@DahmaniAdame

Description

@DahmaniAdame

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version [x]
  • Used the search feature to ensure that the bug hasn’t been reported before [x]

Describe the bug
In some case, the LCP element might be the logo if it's too prominent.

If the logo is changed, and OCI has been already generated, WP Rocket will keep preloading the wrong LCP image.

To Reproduce
Steps to reproduce the behavior:

  1. Make the logo big enough to be the LCP element
  2. Generate OCI
  3. Change the logo
  4. See error

Expected behavior
Though it's not generally expected for the logo to be the LCP element, but it might happen.
We need to track logo changes, at least on the Customizer, and clear rows on OCI where it's being used as the LCP element.

Screenshots
N/A

Additional context
N/A

Acceptance Criteria (for WP Media team use only)

  • On logo change, check if it's used on OCI
    • If yes, clear all
    • If no, do nothing

Metadata

Metadata

Assignees

Labels

module: OCIOptimize Critical Imagespriority: mediumIssues which are important, but no one will go out of business.quick wintype: enhancementImprovements that slightly enhance existing functionality and are fast to implement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions