This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Taxonomy image on Search result

#41369
Ernest MarcinkoErnest Marcinko
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.