How do I add remotePatterns to my config?
Answered
WhyFencePost (Ping Reply) posted this in #help-forum
My config rn is the follwing, and i need to add the pattern, and idk how
and i need to merge in the following;
also is that remotePatterns correct?
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;and i need to merge in the following;
module.exports = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com',
port: '',
},
],
},
}also is that remotePatterns correct?
Answered by joulev
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com',
port: '',
},
],
},
};
export default nextConfig;4 Replies
Siberian
you would put it in the nextConfig object
i tried that, cant get it to work
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com',
port: '',
},
],
},
};
export default nextConfig;Answer
thanks