BACK TO DIRECTORY

Markup to Featured Image

by One Crayon

5.0
(2 ratings)

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 attributes, like width/height, title, alt, etc.) doesn’t matter. You can make it as complicated or simple as you like.

If the post already has a featured image, the plugin will do nothing (version 1.0 does not allow updating the thumbnail by updating the markup).

Plugin Details

Active Installs
10
Total Downloads
6,004
Version
1.0
Requires WP
2.9.1
Requires PHP
Tested Up To
3.4.2
Added
2012-10-14
Last Updated
2012-10-14 8:33pm GMT

Ratings

5
2
4
0
3
0
2
0
1
0