In this example, replace 'example.com' and 'another-domain.com' with the actual hostnames from which you want to load images. This configuration tells Next.js to allow images from these domains.
Save the next.config.js file.
Restart your Next.js development server if it's running to apply the changes.
Now, your Next.js application will be able to load images from the specified hostnames. If you need to add more domains in the future, simply add them to the domains array in the images configuration.