Skip to content

LCP is 404 if imagify "serve next gen webp as picture" is enabled #7955

@Mai-Saad

Description

@Mai-Saad

Describe the bug
When lcp is applied while imagify serve nextgen as picture is enabled, it may cause 404 URL to be preloaded

To Reproduce
Steps to reproduce the behavior:

  1. Avada theme is on
  2. imagify is on with serve next gen as picture + webp on
  3. install and activate WPR 3.20.2
  4. visit home page => if lcp isnot applied yet, clear cache and revisit home page

optimized markup is
<link rel="preload" data-rocket-preload as="image" href="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png.webp%201x" fetchpriority="high">

Expected behavior
No console error

Screenshots

Image Image

Additional context

	<picture data-retina_logo_url="" class="fusion-standard-logo">
<source type="image/webp" srcset="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png.webp 1x"/>
<img src="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png" srcset="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png 1x" width="" height="" alt="e2e.rocketlabsqa.ovh Logo" data-retina_logo_url=""/>
</picture>
  • if imagify is disabled , we clear priority elements and revisit the page , no console error
    optimized markup in this case is
    <link rel="preload" data-rocket-preload as="image" href="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png" imagesrcset="https://mai.e2e.rocketlabsqa.ovh/wp-content/themes/Avada/assets/images/logo.png 1x" imagesizes="" fetchpriority="high">

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd party compatibilityIssues related to 3rd party compatibility like theme, plugin or hostingmodule: OCIOptimize Critical Imagespriority: mediumIssues which are important, but no one will go out of business.severity: majorFeature is not working as expected and no work around availabletype: bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions