{
  "id": 20537250,
  "title": "Shopify's image_tag already lazy-loads. Here's what it leaves to you.",
  "url": "https://urgent.news/2026/11/18/shopifys-image-tag-already-lazy-loads-heres-what-it-leaves-to-you",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T03:10:44.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/rizehub-ph/shopifys-imagetag-already-lazy-loads-heres-what-it-leaves-to-you-1k3a"
  },
  "original_language": "en",
  "account": "Shopify's image_tag automatically implements lazy-loading, but it doesn't provide everything needed for optimal performance. Image_tag automatically adds width and height attributes, a srcset for various widths, lazy-loading to non-critical images, and uses modern formats like WebP or AVIF. However, it lacks information about the image's size in the layout and doesn't handle the hero section efficiently. To optimize your Shopify theme, you need to specify the image size using the 'sizes' parameter, and for the first image (often the LCP element), set 'loading' to 'eager', 'fetchpriority' to 'high', and use the 'preload' parameter with a Link preload hint. This allows Shopify to control which section is considered the hero, even if the merchant rearranges sections. A liquid snippet can be used to dynamically assign 'eager' loading and 'high' fetchpriority to the first section, while lazy-loading is applied to others. This ensures your hero image loads quickly, improving your site's loading performance.",
  "summary": "I used to write my own lazy-loading logic in every Shopify theme. Then I read the image_tag docs properly and deleted most of it. Shopify already does more than people think, and the two things it doesn't do are the ones that actually move LCP. Here's what you get for free, what you still have to write, and a hero snippet I now paste into most theme builds. What image_tag does on its own {{…",
  "key_points": [
    "Shopify's imagetag implements lazy-loading but lacks full performance optimization",
    "Imagetag adds width, height, srcset, lazy-loading for non-critical images, and uses WebP/AVIF"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}