My tip of the week is something I just learned about. A property called fetchpriority that drastically improved our Core Web Vitals. While most developers know about lazy loading, combining a few loading properties can make a big difference. You can further boost the priority of fetching an image using the fetchpriority property.

Here's what it looks like in action:

<link rel="preload" as="image" href="hero.webp" fetchpriority="high">
<img src="hero.webp" loading="eager" fetchpriority="high" decoding="async">

Let's break down why this works so well:

  • The <link rel="preload"> tells browsers to start downloading the image immediately, even before they discover the tag while parsing HTML

  • fetchpriority="high" bumps the image to the top of the browser's resource queue, making it download before less critical resources

  • loading="eager" disables lazy loading for this specific image (crucial for above-the-fold content)

  • decoding="async" lets the browser optimize image decode timing without blocking other tasks

Just remember: use this pattern sparingly for critical above-the-fold images directly impacting LCP. For everything else, stick with regular lazy loading.

And a Pro tip: Combine this with the srcset attribute to handle responsive images, and you've got a bulletproof image-loading strategy. I wrote a little article on it this week. Read it here.

📚 This Week's Picks

Creating Custom VS Code Snippets for Faster Development (4 min)
Let's explore how to create custom snippets that will boost your productivity.

Introduction to C# and .NET (4 min)
What is C#, and what is .NET? The first article in a series Adrián is writing to teach you C#.

Enhanced local IDE experience for AWS Lambda developers (8 min)
AWS Lambda is introducing an improved local IDE experience to simplify Lambda-based application development.

25 crazy software bugs explained (video)
Fireship dives into 25 crazy software bugs that changed the world.

React Native - New Architecture is here (22 min)
The 0.76 release blog post shared a list of significant changes in this version.

Lessons learned from a successful Rust rewrite (12 min)
A great deep dive into some important lessons when migrating a C++ codebase to Rust.

📖 Book of the Week

This book is essential for technical leaders navigating the complexities of engineering management. Drawing from his extensive experience at companies like Stripe and Uber, Larson offers practical frameworks for scaling engineering organizations, developing talent, and driving technical strategy.

🛠️ Something Cool

This is not a sponsored post (I am mentioning it because I do see Posthog sponsors a lot of content). I've been using this tool again recently for a couple of projects, and it's just fantastic.

PostHog offers the full package—session recordings, feature flags, A/B testing, and product analytics. Whether you're running early experiments or want to systemize your product decisions, PostHog provides the data and tools needed to make data-driven choices.

If you have any ideas or feedback, reply to this email.

Thanks, and stay awesome,

Niall

Founder @ Codú

Keep Reading