Relative Content

Tag Archive for javascriptnext.jsmern

How to replace actual Image with dummy image when image is not present

<div className=”bg-[#F8F8F8] flex items-center justify-center px-2 py-10″> <Image src={image} alt=”course image” width={100} height={100} /> </div> I want when image is not available due to error so replace it with dummy image how can i do that? javascript next.js mern 0 import fallbackImage from ‘./assets/dummy-image.jpg’; import the fallback image and Conditional src: The src attribute uses […]