In this tutorial I will show you how to add a full page background image in Next.js using the Image Component.
The Image Component has a lot of great built-in features that helps us achieve amazing Core Web Vitals metrics. Core Web Vitals are not only important metrics related to user-experience on our web app, but are also key factors in determining Google’s Search rankings. That’s why we have to pay a lot of attention to how we deliver and display images on our website.
Image Component comes in our help!
So if you are looking for “How to add a background image in Next.js using the Image Component”, this is the right video for you. Thanks to Image Component built-in performance optimizations, Next.js knows at build time the correct size of our images so to automatically prevent Cumulative Layout Shift (CLS), a key metric in measuring visual stability.
Github Repo - https://github.com/theitaliandev/next...
Next.js Image Component Docs - https://nextjs.org/docs/api-reference...
CSS Reset - https://meyerweb.com/eric/tools/css/r...
Image used for the thumbnail and the video - https://unsplash.com/photos/0vw4InAC-yM
Core Web Vitals - https://web.dev/vitals/