Urgent.News

What's breaking now, across thousands of outlets.

Tech

Shopify's image_tag already lazy-loads. Here's what it leaves to you.

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 {{…

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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Keep CSS scroll snap targets visible below a fixed header

A scroll-snap layout can select the correct section and still feel broken: the section heading lands beneath a fixed header. The snap rule is not necessarily wrong.

  • Use scroll-padding-top to reserve space for fixed header.
  • Maintain scroll-snap-align: start and vertical snapping.
  • Verify heading's top edge is at or below header's bottom edge.

Part 29: Agent cards in practice

Part 29 · One Agent, Five Platforms An agent card is a CV for an agent. It tells other agents who it is, what it can do, where to reach it and how to prove who's calling.

  • Agent card contains agent's name, description, version and capabilities.
  • Invoice exception agent is read-only, uses Entra agent identity for authentication.
  • Supplier-communication agent drafts reply skill, but doesn't send emails.

How to Answer 'Tell Me About Yourself' in a Scrum Master Interview

How to Answer “Tell Me About Yourself” in a Scrum Master Interview The best way to answer “Tell me about yourself” in a Scrum Master interview is to stop listing your certifications and start telling…

  • Focus on optimizing flow and eliminating systemic blockers rather than managing Jira tickets
  • Bridge technical and business perspectives to convert roadmaps into clear, value-driven sprints
  • Cultivate psychological safety through constructive Sprint Retrospectives and inclusive daily syncs

More from Wednesday 18 November →