Add WordPress images to the RSS feed

By default, if you have enabled the WordPress RSS feed, images will not be included in the RSS feed. However, it makes sense to include a post image in the RSS feed.

For example, internet portals read a RSS feed of a website to display the title and text of a post. Often a field for the post image is also displayed.

How do I add images to the RSS feed?

The following code snippet makes it easy to automatically include your post image into the WordPress RSS feed. Paste this code, eg. in the functions.php file of your theme:

You can define another image size as follows:

You can also define an individual image size for the images that are now included in the RSS feed. Simply change the existing thumbnail name “thumbnail” to another image size.

For a large image size, use “large” or “full” instead, like the following example:

It works? You can check this by visiting to the RSS feed URL of your WordPress website.