Your usage of the Next.js Image component with Cloudinary is almost correct, but there is a mismatch between your remotePatterns configuration and the actual image URL you are using.
1. remotePatterns Configuration
You have:
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'res.cloudinary.com',
port: '',
pathname: '/account123/**',
search: '',
},
],
},
};
But your image URL is:
<https://res.cloudinary.com/digi2hcyz/image/upload/v1751251601/productImage/n20mm1mqjd7ljqlvl3fv.png>
Notice that the pathname in your config is /account123/**, but your actual image path starts with /digi2hcyz/. For the image to be allowed, the pathname pattern must match the start of the path after the hostname. So, you should update your config to:
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'res.cloudinary.com',
port: '',
pathname: '/digi2hcyz/**',
search: '',
},
],
},
};
This will allow images from your Cloudinary account with the correct path pattern. The rest of your usage is correct, including the <Image /> component usage in your table cell.
2. Reference