Breno Gomes
New Coder
Hello everyone, how are you? I would like to know what should I modify to preload the logo so that I can improve my store LCP speed on page speed. Sorry I don't understand anything about codes
This is the code I found in the store theme at ''header.liquid'', I think it refers to the logo.
This is the code I found in the store theme at ''minimal-header.liquid''
Site link: Ponto Descontos Site Oficial - O Ponto da Felicidade com Frete Grátis
This is the code I found in the store theme at ''header.liquid'', I think it refers to the logo.
Code:
{%- capture header_logo -%}
<a href="{{ routes.root_url }}" class="header__logo-link">
{%- if section.settings.logo != blank -%}
{%- capture image_size -%}{{ section.settings.logo_max_width }}x{%- endcapture -%}
<img class="header__logo-image"
style="max-width: {{ section.settings.logo_max_width }}px"
width="{{ section.settings.logo.width }}"
height="{{ section.settings.logo.height }}"
src="{{ section.settings.logo | img_url: image_size, scale: 2 }}"
alt="{{ section.settings.logo.alt | default: shop.name | escape }}">
This is the code I found in the store theme at ''minimal-header.liquid''
Code:
<h1 class="header__logo">
<a href="{{ routes.root_url }}" class="header__logo-link">
{%- if section.settings.logo != blank -%}
{%- capture image_size -%}{{ section.settings.logo_max_width }}x{%- endcapture -%}
<img class="header__logo-image"
src="{{ section.settings.logo | img_url: image_size }}"
srcset="{{ section.settings.logo | img_url: image_size }} 1x, {{ section.settings.logo | img_url: image_size, scale: 2 }} 2x"
alt="{{ section.settings.logo.alt | default: shop.name | escape }}">
{%- else -%}
<span class="header__logo-text">{{ shop.name }}</span>
{%- endif -%}
</a>
</h1>
Site link: Ponto Descontos Site Oficial - O Ponto da Felicidade com Frete Grátis