Some sections, especially image banners
Posted: Wed Jan 22, 2025 4:32 am
Testing changes and evaluating performance using tools such as WebPageTest can help you refine your approach for optimal results. Optimizing large image sections using fetch priority WARNING: The get-priority feature is powerful but should be used with caution and after thorough testing, as misuse may result in performance degradation.
Some sections, especially image banners with large india business fax list , may be Largest Contentful Paint (LCP) elements. With this in mind, setting fetchpriority="high" for these sections (especially if they are the first section in the template) may speed up LCP rendering. High-level implementation: liquid {%- Liquid Assign loading="eager" Specify fetchpriority = "auto" If section.
index == 1 Specify fetchpriority = "high" elsif part.index > 2 Specify loading="lazy" just in case -%} {{ Section.Settings.Image | Image URL: Width: 1080 | Image Tags: Loading: Loading, Get priority: Get priority }} Simplified code (using default lazy loading): liquid {%- Liquid Specify fetchpriority = "auto" If section.
Some sections, especially image banners with large india business fax list , may be Largest Contentful Paint (LCP) elements. With this in mind, setting fetchpriority="high" for these sections (especially if they are the first section in the template) may speed up LCP rendering. High-level implementation: liquid {%- Liquid Assign loading="eager" Specify fetchpriority = "auto" If section.
index == 1 Specify fetchpriority = "high" elsif part.index > 2 Specify loading="lazy" just in case -%} {{ Section.Settings.Image | Image URL: Width: 1080 | Image Tags: Loading: Loading, Get priority: Get priority }} Simplified code (using default lazy loading): liquid {%- Liquid Specify fetchpriority = "auto" If section.