Add image to each podcast series (or category) in headless WordPress instance

We have a WordPress instance that we query through it's API. Contents are posts, or episodes from a Podlove plug-in. We have four podcasts, though at the moment only one is set up in Podlove. We indicate the podcast an episode belongs to by adding a category.

Now we'd like to add a logo to each podcast series. We are considering two solutions:

  • We could set up all podcasts in Podlove (which probably should have been done from the beginning). But as far as we know, there's wouldn't be a clean way to read it using the API.
  • We could use the categories. At the moment we have four categories that we only use for the podcasts as well as a parent podcast category. But our first experiments with this plug-in also indicated that the category image is not included in the API and we couldn't find any plug-in that seems to be intended to be used with a headless Wordpress installation.

What would be the simplest or most standard solution for us to get a logo for each podcast?

Topic headless podcasting rest-api categories Wordpress

Category Web


I think it would be prudent to create a new custom taxonomy now named podcast in order to categorize your episodes separate from other content.

Whether using a custom podcast taxonomy or generic categorys, taxonomies do not support attached media or featured images out of the box. You'll likely need to store a media attachment ID for the image in taxonomy meta-data, and either expose that meta to the REST API using register_meta() or add it as a field to the relevant response using register_rest_field().

If podcast logos are some feature supported by the Podlove plugin/service, then you will need to consult their official support channels for how you should retrieve it via API.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.