Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Taxonomy image on Search result › Reply To: Taxonomy image on Search result
February 14, 2023 at 4:36 pm
#41369
Keymaster
Unfortunaately it is not possible to change that via that function, it only returns the data based on the plugin configuration.
In this case that would have no effect even if it is implemented, because taxonomy images are not wordpress core feature. The image is directly fetched from the field, whatever the size is of that image ID.
If you use ACF, then based on this stack overflow article, you may be able to get a different size via the get_field function:
$image = get_field('image', get_asp_result_field('taxonomy') . '_' . get_asp_result_field('id'));
echo '<img src="'.$image['sizes']['medium'].'" alt="$image['alt']" />';
But I don’t know if this is going to work at all, as I am not that familiar on how to properly fetch a taxonomy image via core ACF.