1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

How to set 'fetchpriority="high"' for the Hero Image in Divi to improve LCP?

Discussion in 'Free Divi Community Forum' started by rindt kata, Apr 29, 2026 at 10:24 AM.

  1. rindt kata

    rindt kata New Member

    Hi everyone! I'm working on optimizing my Core Web Vitals and I need to prioritize the loading of my main header/hero image.

    Is there a built-in way in Divi (or a simple code snippet) to add the fetchpriority="high" attribute to a specific Image or Background Image module?

    Currently, the LCP value is lagging because the browser doesn't recognize the hero image as a priority. I want to make sure the header picture loads first and doesn't wait for other assets. Any tips or hooks for this? Thanks!
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade content toggle design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    For new Divi 5, you can add custom attributes by going to Image Module Settings > Advanced tab > Attributes > Add Attribute > Enter Custom Attribute
     
  3. Divi.Help

    Divi.Help Administrator
    Staff Member

    For new Divi 5, you can add custom attributes by going to Image Module Settings > Advanced tab > Attributes > Add Attribute > Enter Custom Attribute
     
    1. PRO MEMBER PERKS Divi Ultimate Child Theme - Tons of premade layouts & section designs + functionalities for your Divi site:Learn More