7
4 Comments

Guide to using images in Next.js

https://shipsaas.com/blog/guide-to-using-images-in-nextjs
submitted this linkon November 9, 2021
  1. 1

    Nice write up. I saved the article for future reading. One question I have is how to have different images for different screens? The Image component takes care of responsiveness for most uses but I couldn't figure out how to load separate images.

    1. 1

      You'll have to do it manually - i.e. when rendering an image component check the screen size and show the appropriate image.

      Something like this: https://imgur.com/a/oJ0X7Bz

      1. 2

        Ohh interesting. I'll have to try that with the project I'm working on. Thanks