Scrums.com logomark
SovTech is now Scrums.com! Same company, new name.
SovTech is now Scrums.com!!
Read more here

Engineering Newsletter: Issue #17 – Image Optimisation

Discover how Next.js's next/image component simplifies image optimization for web apps, boosting performance and user experience. Learn best practices and more!

Aobakwe Kodisang
February 14, 2023
Blog cover image

Issue #17 – Image Optimisation

<1/> The Weekly Dev

When working with the web, images play an important role in user experience, images are used to communicate branding. It is thus important that these images are of good quality and appear as intended for the user without affecting user experience, however, good quality images might also mean bigger sized images and ultimately slowing your application, either by taking long to load, or affecting the layout of the application. In the pursuit of optimisation we are guided by Google’s Web Core Vitals, the metrics to consider being loading, interactivity, and visual stability.

Easy enough, because we can use the humble <img> element, if we play around enough with it, we can achieve good scores. You pass the alt attribute for accessibility, the width and height for browsers to know how much space to reserve for the image, this way we avoid layout shifts. We can use sizes and srcset attributes to achieve responsiveness, there is still more to do in order to achieve good user experience and adhere to Web Core Vitals guidelines.

The Next.js Image component, next/image, is an extension of the HTML <img> element, evolved for the modern web. It includes a variety of built-in performance optimizations to help you achieve good Core Web Vitals.

The NextJS Image component next/image has become the hero for image optimisation for a while, it gives developers more time to worry about the core function of an application and not worry much about images, you do not need to worry about the size the image comes in as because it will correctly optimize for the size of the image. Faster image loads, because images are only loaded when they enter the viewport. You do not need to worry much about working with the <img/> API, if the case is that you want more control and want to be closer to the <img/> element, you can use the next/future/image component which is now no longer in beta. In fact, there are plans to change the current next/image component to next/legacy/image in the future, so it would not hurt to start playing around with it. The alt property is also required for better accessibility.

<2/> Deeper Dives

Next.jstimneutkensNext.js 12.3 introduces TypeScript Auto-Install, improved Fast Refresh, stable new Image Component, and more!Next.js 12.3

<3/> Inside the Console

AWS Cloud Map helps monitor your resources’ health, through automated health checks. When working with microservices using dynamic resources, some of these resources can be created and destroyed, their dependencies thus need to know their locations or state, as you update your resource and change their locations, Cloud Map helps resources discover the the latest location of the resources that they depend on.

Check-out the list of features and pricing for AWS Cloud Map.

<4/> Geeking It Up

Javascript Testing Best Practices
Here are some of the best practices for testing your Javascript and NodeJs applications. This list comprises of best practice blogs, books and tools.

Postgres-wasm
A PostgresQL server that runs inside a browser. Supabase has collaborated with Snaplet, to bring us a way to persist data in the browser.

Typescript Tutorials
A hands on and interactive way to learn Typescript. Learn some nuggests that could make you a Typescript Wizard.
Make a video
A state-of-the-art AI system generates high-quality videos from text prompts

DraculaUI
Dracula UI is a dark-first collection of UI patterns and components.

Next.js Image Component to the Rescue for Image Optimization!

In this issue, we explored the importance of image optimization for web applications. While high-quality images enhance user experience, they can also slow down your app. We dove into how Next.js's next/image component simplifies image optimization, saving developers valuable time and ensuring exceptional user experience.

If you’re ready to take your web app's performance to the next level, Scrums.com can help! Our expert development team can leverage cutting-edge tools to build high-performing web applications for your business needs. Contact us today for a free consultation!

As seen on FOX, Digital journal, NCN, Market Watch, Bezinga and more
Scale Your Development Team
Faster With Scrums.com
Get in touch and let's get started
Book a Demo
Tick
Cost-effective
Tick
Reliable
Tick
Scalable