# How do I include images in the Swiftype WordPress plug-in's autocomplete dropdown?

**URL:** <https://community.swiftype.com/t/how-do-i-include-images-in-the-swiftype-wordpress-plug-ins-autocomplete-dropdown/114>\
**Category:** WordPress\
**Created:** [December 22, 2015, 6:26pm UTC](https://community.swiftype.com/t/how-do-i-include-images-in-the-swiftype-wordpress-plug-ins-autocomplete-dropdown/114 "2015-12-22T18:26:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/swiftype/original/1X/fd652d1735c60057fa71c371375511028f9a1832.png) [@system](https://community.swiftype.com/u/system)\
**Post date:** [December 22, 2015, 6:26pm UTC](https://community.swiftype.com/t/how-do-i-include-images-in-the-swiftype-wordpress-plug-ins-autocomplete-dropdown/114/1 "2015-12-22T18:26:45Z")

</div>

> **How do I include images in the autocomplete results when using the Swiftype Search plug-in for WordPress?**

To customize the autocomplete dropdown for your search engine built with the Swiftype plug-in for WordPress, you’ll need to create a `customRenderFunction` to be added to your theme’s `functions.php`.

Here’s a general snippet to get you started:

```auto
<?php
function swiftype_javascript_config() {
?>
<script type="text/javascript">
 var customRenderFunction = function(document_type, item) {
      var title = item['highlight']['title'] || Swiftype.htmlEscape(item['title']);
      var image = item['image'];
      return '<p class="title"><img src="' + image + '">' + title + '</p>';
    };

var swiftypeConfig = {
  renderFunction: customRenderFunction
};
</script>
<?php
}

add_action('wp_head', 'swiftype_javascript_config');
?>

```

As long as you’re [indexing thumbnail image values](https://community.swiftype.com/t/how-do-i-include-featured-images-in-my-wordpress-based-engine/103) to your engine, you should now have images in your autocomplete dropdown!
