next.config & cloudinary
Answered
Ojos Azules posted this in #help-forum
Ojos AzulesOP
Last year i added this to my next.config so to display images from cloudinary
Now is deprecated. Any idea how to fix it? Thanks.
Btw, i added this but doesnt work
I get this error:
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: ["res.cloudinary.com"],
},
};
module.exports = nextConfig;Now is deprecated. Any idea how to fix it? Thanks.
Btw, i added this but doesnt work
/** @type {import('next').NextConfig} */
module.exports = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'res.cloudinary.com',
port: '',
pathname: '<my-id>/image/upload/**',
},
],
},
}I get this error:
ReferenceError: module is not defined in ES module scope Answered by Ojos Azules
You need <CldImage /> something like this and not <Image /> of next
7 Replies
Cimarrón Uruguayo
for now just roll with the deprecated solution
check if there are any official documentation on cloudinary that mentions how to address this
@Cimarrón Uruguayo for now just roll with the deprecated solution
Ojos AzulesOP
you cant thats the problem
But i fixed it
cloudinary has a youtube video that helps you
Ojos AzulesOP
You need <CldImage /> something like this and not <Image /> of next
Answer
Cimarrón Uruguayo
ah awesome!