Image placeholder if image from the database is blank

This is a really simple one this show an image placeholder like this if no image exists for this image field.
Screenshot 2023-04-26 at 18.46.11

You will need to find the field number and add this in. Also you can change the url of the image and change the size.

CSS

/*tables*/
.field_* {
  background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQ4HtE_O8tvs-TlF27vWMWHjxoCQ7HmFmZHBkZpKt1n4PFIN-aN&usqp=CAU)!important;
  background-repeat: no-repeat;
  background-size: contain;
}

/*lists and detail views*/
.field_* .kn-detail-body {
  background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQ4HtE_O8tvs-TlF27vWMWHjxoCQ7HmFmZHBkZpKt1n4PFIN-aN&usqp=CAU)!important;
  background-repeat: no-repeat;
  background-size: contain;
  
}
1 Like

So simple @Johnny_Appknowledged_UK thanks mate!