WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Ben Huson v1.0

Taxonomy Images

Associate images from your media library to categories, tags and custom taxonomies.

Taxonomy Images

The facts

Rating
4.4★ from 40
Active installs
9k+
Price
Free
Last updated
15 Feb 2024
Added
Feb 2010
Requires WP
4.4
Tested up to
WP 6.4.10
Requires PHP
5.3
Downloads
222,305

Our analysis

AI-assisted

Taxonomy Images is a WordPress plugin that allows you to associate images with taxonomy terms, such as categories and tags. It provides filters that can be used in your theme to display these images in various templates like category.php and tag.php. The plugin is designed for developers who want to enhance the visual representation of taxonomy archives on their sites.

The plugin supports displaying a single image for each term and allows for customization of the image's HTML attributes. You can also retrieve the image ID, object, or URL using specific filters, making it flexible for different use cases.

Best for: This plugin suits developers looking to enhance taxonomy term displays with images on WordPress sites.

What it does well

  • Free to use from the WordPress.org directory
  • Allows image associations with taxonomy terms
  • Customizable HTML output for images
  • Compatible with standard WordPress templates
  • Active installations indicate user interest

Where it falls short

  • Limited feature information provided
  • Requires some coding knowledge to implement

Verdict

Taxonomy Images is a useful tool for developers wanting to visually enrich taxonomy archives, though it requires technical knowledge to implement effectively.

From the developer

Ben Huson's own description of Taxonomy Images, lightly tidied.

Displaying Your Images in Your Theme

There are a few filters that you can use in your theme to display the image associations created by this plugin. Please read below for detailed information.

Display a single image representing the term archive

The following filter will display the image associated with the term asked for in the query string of the URL. This filter only works in views that naturally use templates like category.php, tag.php, taxonomy.php and all of their derivatives. Please read about template hierarchy for more information about these templates. The simplest use of this filter looks like:

print apply_filters( 'taxonomy-images-queried-term-image', '' );

This code will generate and print an image tag. It’s output can be modifed by passing an optional third parameter to apply_filters(). This parameter is an array and the following keys may be set:

  • after (string) – Text to append to the image’s HTML.

  • attr (array) – Key / value pairs representing the attributes of the img tag. Available options include: alt, class, src and title. This array will be passed as the fourth parameter to WordPress core function wp_get_attachment_image() without modification.

  • before (string) – Text to prepend to the image’s HTML.

  • image_size (string) – May be any image size registered with WordPress. If no image size is specified, ‘thumbnail’ will be used as a default value. In the event that an unregistered size is specified, this filter will return an empty string.

Here’s an example of what a fully customized version of this filter might look like:

print apply_filters( 'taxonomy-images-queried-term-image', '', array(
    'attr'       => array(
        'alt'   => 'Custom alternative text',
        'class' => 'my-class-list bunnies turtles',
        'src'   => 'this-is-where-the-image-lives.png',
        'title' => 'Custom Title',
        ),
    'before'     => '<div id="my-custom-div">',
    'after'      => '</div>',
    'image_size' => 'medium'
) );

Similar functionality

If you just need to get the database ID for the image, you may want to use:

$image_id = apply_filters( 'taxonomy-images-queried-term-image-id', 0 );

If you need to get the full object of the image, you may want to use:

$image = apply_filters( 'taxonomy-images-queried-term-image-object', '' );

If you need to get the URL to the image, you may want to use the following:

$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for libraries and archives.

Starter Templates

The growing library of 300+ ready-to-use templates that work with all WordPress themes including Astra, Hello,...

Free 1M+ installs 4.9★ (4,745)
SVG Support

Securely upload SVG files to your media library, with built-in sanitization and advanced features for styling...

Free 1M+ installs 4.8★ (355)
Enable Media Replace

Easily replace any attached image/file by simply uploading a new file in the Media Library edit view - a real...

Free 600k+ installs 4.4★ (302)
Happy Addons for Elementor

HappyAddons packs Header Footer Builder, Megamenu, Single Post, Archive Page, &amp; 500+ Ready Templates into...

Free 400k+ installs 4.8★ (487)
CMB2

CMB2

91

CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.

Free 300k+ installs 5★ (91)
Extendify

The best WordPress templates, pattern, and layout library with 1,000+ designs built for the Gutenberg block ed...

Free 500k+ installs 4.7★ (10)