Looking to display a logo in next.js, my plan is to show a span if the logo is not available and hide it if it is.
<div className='brand'>
<Link href="#">
<img src="#" alt="UnSet" />
<span>UnSet</span>
</Link>
</div>
I managed to hide the image using the CSS rule below. Now I want to display the span content when the image is empty, and show the image when it's not empty.
.brand a img[src]{
display: none;
}
Any suggestions on how to achieve this?