The background image is not showing. I also tried "bg-[url(‘/image/example.jpeg’)"
tailwind.config.js
theme: {
extend: {
colors: {
darkBlue: "#0D1A32",
},
backgroundImage: {
"hero-image": "url('/app/images/lentcm93p_1.jpg')",
},
},
},
plugins: [],
};
Page.js
export default function Home() {
return (
<>
<div className="h-[455px] w-full bg-hero-image bg-cover">
</div>
</>
);
}
2
Answers
Maybe file
/app/images/lentcm93p_1.jpg
doesn’t exist on your projectIt may be because of the wrong reference. Usually
/app
wouldn’t be used.Try changing
to