Automatically set the featured image (formerly the post thumbnail) for a post based on custom markup in the body text.
As of April 2026, Markup to Featured Image is a WordPress post plugin with 10 active installations and a 5/5 rating from 2 reviews. It has been downloaded 5.2K+ times in total. Requires WordPress 2.9.1+ and PHP false+. Available on WordPress.org since 2012. Last updated 13 years ago — may have compatibility concerns. Top alternative: Header and Footer Scripts.
Markup to Featured Image will automatically generate a featured image when you publish a post, with the intent of allowing you to publish posts with featured images from third-party clients like MarsEdit.
To add a featured image to your post, include one of the following markup variants in your post’s content:
<img src="/path/to/image.jpg" data-featured-image="keep" />
<img src="/path/to/image.jpg" data-featured-image="strip" />
<!--featured-image:/path/to/image/.jpg-->
If you use an <img> element, the values of the data-featured-image attribute specify whether the image should be displayed when the post is shown on your site (keep) or ignored when the post is displayed (strip). The order of attributes in your <img> tag (and whether you include other a…
| WordPress | 2.9.1+ requiredTested up to 3.4.2 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.