How can I show an image in a view using the Search API Views integration? I am using the Search API Views module; I have created an index of users, and on this site, there is an image field on the user profile with a single value (not a user picture, just a standard image field).

I am now making a view and trying to show the image from each user in a field of the view.  I added the Index User: Picture field, but when I do so, I have three choices for the display:


Show entity label (gives me the filename (image.jpg) with a link to the image)
Show entity ID (gives me the number of the entity)
Show complete entity (doesn't display anything)


I read this issue on images in Search API, which is marked as a duplicate of a fixed issue, but I don't understand how it is fixed or what I am supposed to display the image.

I want to show the image as a thumbnail in the view.  What's the easiest way to do this? (Given the filename, I imagine I could write a custom views template to print the thumbnail image as suggested in this question on Apache Solr Views, but it seems like there is probably an easier way (the linked Search API issue was fixed four years ago).
You're on the right track. To achieve this in Views:


Add the indexed image field to the View Fields list
Set 'Display' to 'Show entity label' 
Untick 'Link to entity' - this adds additional HTML in the token used below that will stuff things up
Select 'Rewrite output of this field', and use this code:

&lt;img src="/sites/default/files/[field_files_file]" /&gt;


Check the token is right, under 'Replacement tokens', but this should allow you to render the image into the View output. 

From here, you can specify any inline attributes you want, e.g. width, height and so on. 

You could achieve a thumbnail look this way, or alternately you could use image styles to generate a thumbnail of the image your users upload, then index that field instead. Note that image styles will save your new image under a different directory, so sites/default/files won't work.