From Next.js v11 onwards, you can do what you were doing without any additional config:
import macbookIphone from '../../assets/images/mac-iphone.jpg';
<Image src={macbookIphone} />
// or
<img src={macbookIphone.src} />
Ref: next/image
For earlier versions if you wish to import images instead of putting them in public directory, then you can configure file-loader or url-loader.