The SEO Optimization Images Pro plugin gives a feature to show the Primary Category in the Image Alt & Title text. To show the primary category, follow the below steps:
- Firstly, you need to install & activate the Yoast SEO plugin.
- Go to Posts >> All Posts >> Click on the post you want to assign to a category.
- Under Post Settings on the right, expand the Categories option.
- Click on Add New Category option, then will see the Select the primary category option.
- Select the category that you want to make the primary category.
- Click Update or Publish to apply the changes to that post.
- Return to the WP dashboard and Go to the SEO Optimization Images Pro option page.
- Enter the %category value in the Alt attribute value and Title attribute value options.
- Scroll down the page and checked the Enable Yoast primary category option.
- Save the changes and check them.
Note: Need to add more than one category in the individual post after that Select the primary category option will show.