# Image placeholder if image from the database is blank

**URL:** <https://forums.knack.com/t/image-placeholder-if-image-from-the-database-is-blank/14155>\
**Category:** Show & Tell\
**Created:** [April 26, 2023, 5:50pm UTC](https://forums.knack.com/t/image-placeholder-if-image-from-the-database-is-blank/14155 "2023-04-26T17:50:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnny\_Appknowledged\_UK](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/johnny_appknowledged_uk/32/2898_2.png) [@Johnny\_Appknowledged\_UK](https://forums.knack.com/u/Johnny_Appknowledged_UK)\
**Post date:** [April 26, 2023, 5:50pm UTC](https://forums.knack.com/t/image-placeholder-if-image-from-the-database-is-blank/14155/1 "2023-04-26T17:50:15Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/e/e5aec252052fb673ec227e7bd7e9e80ca3defa24.png)

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**

```auto
/*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;
  
}

```

---

<div class="post-metadata">

**Author:** ![BradStevens](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/bradstevens/32/140_2.png) [@BradStevens](https://forums.knack.com/u/BradStevens)\
**Post date:** [April 29, 2023, 1:44am UTC](https://forums.knack.com/t/image-placeholder-if-image-from-the-database-is-blank/14155/2 "2023-04-29T01:44:21Z")

</div>

So simple @Johnny_Appknowledged_UK thanks mate!
