{"id":408684,"date":"2026-11-22T01:12:22","date_gmt":"2026-11-22T01:12:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/reinvent-auto-featured-image\/"},"modified":"2026-11-22T02:21:33","modified_gmt":"2026-11-22T02:21:33","slug":"reinvent-auto-featured-image","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/reinvent-auto-featured-image\/","author":23258933,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"1.0.2","tested":"7.1.5","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"Reinvent Auto Featured Image","header_author":"Reinvent WP","header_description":"Gives every post a featured image: the first image in its content, or a fallback image. Fill old posts after a preview, and undo it in one click.","last_updated":"2026-11-22 02:21:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/reinvent-auto-featured-image","header_author_uri":"https:\/\/reinventwp.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":37,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"reinventwp","date":"2026-11-22 01:11:55","revision":3816002},"1.0.2":{"tag":"1.0.2","author":"reinventwp","date":"2026-11-22 02:21:33","revision":3816040}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3816001,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3816001,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3816001,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3816001,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3816040,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/upload.php?page=rwpaf-auto-featured-image\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"reinvent-auto-featured-image\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\n\\\/**\\n * Live Preview demo content (runs in WordPress Playground, see build.py).\\n * Draws 5 simple landscape pictures with GD and creates 6 older posts without a featured image:\\n * 5 with a picture in their content and 1 with text only. Then sets a fallback image, so the\\n * preview on Media > Auto Featured Image shows both kinds.\\n *\\\/\\n\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/image.php';\\n\\n\\\/\\\/ A soft landscape: sky gradient, sun, two hills.\\n$scene = function ( $name, $sky_top, $sky_bottom, $sun, $hill_back, $hill_front ) {\\n\\t$w  = 1600;\\n\\t$h  = 900;\\n\\t$im = imagecreatetruecolor( $w, $h );\\n\\tfor ( $y = 0; $y < $h; $y++ ) {\\n\\t\\t$t = $y \\\/ $h;\\n\\t\\t$c = array();\\n\\t\\tfor ( $i = 0; $i < 3; $i++ ) {\\n\\t\\t\\t$c[ $i ] = (int) round( $sky_top[ $i ] + ( $sky_bottom[ $i ] - $sky_top[ $i ] ) * $t );\\n\\t\\t}\\n\\t\\timageline( $im, 0, $y, $w, $y, imagecolorallocate( $im, $c[0], $c[1], $c[2] ) );\\n\\t}\\n\\timagefilledellipse( $im, 1150, 330, 220, 220, imagecolorallocate( $im, $sun[0], $sun[1], $sun[2] ) );\\n\\tforeach ( array( array( $hill_back, 520, 0.0045, 90 ), array( $hill_front, 650, 0.006, 70 ) ) as $hill ) {\\n\\t\\tlist( $color, $base, $freq, $amp ) = $hill;\\n\\t\\t$points = array( 0, $h );\\n\\t\\tfor ( $x = 0; $x <= $w; $x += 40 ) {\\n\\t\\t\\t$points[] = $x;\\n\\t\\t\\t$points[] = (int) ( $base - $amp * sin( $x * $freq ) );\\n\\t\\t}\\n\\t\\t$points[] = $w;\\n\\t\\t$points[] = $h;\\n\\t\\timagefilledpolygon( $im, $points, imagecolorallocate( $im, $color[0], $color[1], $color[2] ) );\\n\\t}\\n\\t$upload = wp_upload_dir();\\n\\t$path   = $upload['path'] . '\\\/' . $name . '.jpg';\\n\\timagejpeg( $im, $path, 88 );\\n\\timagedestroy( $im );\\n\\t$id = wp_insert_attachment(\\n\\t\\tarray(\\n\\t\\t\\t'post_mime_type' => 'image\\\/jpeg',\\n\\t\\t\\t'post_title'     => $name,\\n\\t\\t\\t'post_status'    => 'inherit',\\n\\t\\t),\\n\\t\\t$path\\n\\t);\\n\\twp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $path ) );\\n\\treturn $id;\\n};\\n\\n\\\/\\\/ \\\"On save\\\" off while the old posts are created, so they start without a featured image.\\nupdate_option(\\n\\t'rwpaf_settings',\\n\\tarray(\\n\\t\\t'post_types' => array( 'post' ),\\n\\t\\t'on_save'    => false,\\n\\t)\\n);\\nwp_delete_post( 1, true ); \\\/\\\/ \\\"Hello world!\\\"\\n\\n$mountains = $scene( 'mountain-weekend', array( 120, 170, 230 ), array( 230, 240, 250 ), array( 255, 236, 180 ), array( 110, 140, 190 ), array( 60, 95, 140 ) );\\n$sunset    = $scene( 'studio-sunset', array( 250, 170, 120 ), array( 255, 230, 200 ), array( 255, 250, 230 ), array( 200, 120, 110 ), array( 140, 80, 90 ) );\\n$trail     = $scene( 'spring-trail', array( 150, 210, 240 ), array( 235, 248, 240 ), array( 255, 245, 200 ), array( 120, 190, 130 ), array( 70, 140, 90 ) );\\n$morning   = $scene( 'morning-light', array( 255, 220, 150 ), array( 255, 245, 225 ), array( 255, 255, 240 ), array( 230, 170, 100 ), array( 190, 120, 70 ) );\\n$lake      = $scene( 'quiet-lake', array( 90, 140, 200 ), array( 210, 225, 245 ), array( 245, 245, 255 ), array( 80, 120, 170 ), array( 40, 80, 120 ) );\\n$fallback  = $scene( 'blog-default-image', array( 220, 235, 251 ), array( 245, 249, 255 ), array( 108, 180, 240 ), array( 191, 217, 246 ), array( 150, 190, 235 ) );\\n\\n$posts = array(\\n\\tarray( 'A weekend in the mountains', 'Two days, three lakes and one very early sunrise.', $mountains ),\\n\\tarray( 'Our new studio is open', 'We moved! Come and see the new space.', $sunset ),\\n\\tarray( 'Office news: we are hiring', 'We are looking for a designer and a support lead.', 0 ),\\n\\tarray( 'Five quick breakfast ideas', 'Simple breakfasts you can make in under ten minutes.', $morning ),\\n\\tarray( 'Spring trail guide', 'Our favourite easy trails for spring.', $trail ),\\n\\tarray( 'A quiet morning by the lake', 'Coffee, fog and not a single notification.', $lake ),\\n);\\n$time = time() - count( $posts ) * DAY_IN_SECONDS;\\nforeach ( $posts as $i => $p ) {\\n\\tlist( $title, $summary, $image ) = $p;\\n\\t$content = '<!-- wp:paragraph --><p>' . $summary . '<\\\/p><!-- \\\/wp:paragraph -->';\\n\\tif ( $image ) {\\n\\t\\t$content .= sprintf( '<!-- wp:image {\\\"id\\\":%1$d} --><figure class=\\\"wp-block-image\\\"><img src=\\\"%2$s\\\" alt=\\\"\\\" class=\\\"wp-image-%1$d\\\"\\\/><\\\/figure><!-- \\\/wp:image -->', $image, wp_get_attachment_url( $image ) );\\n\\t}\\n\\twp_insert_post(\\n\\t\\tarray(\\n\\t\\t\\t'post_title'   => $title,\\n\\t\\t\\t'post_content' => $content,\\n\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t'post_date'    => gmdate( 'Y-m-d H:i:s', $time + $i * DAY_IN_SECONDS ),\\n\\t\\t)\\n\\t);\\n}\\n\\nupdate_option(\\n\\t'rwpaf_settings',\\n\\tarray(\\n\\t\\t'post_types'  => array( 'post' ),\\n\\t\\t'on_save'     => true,\\n\\t\\t'fallback_id' => $fallback,\\n\\t)\\n);\\n\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3816001,"resolution":"1","location":"assets","locale":"","width":1280,"height":900},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3816001,"resolution":"2","location":"assets","locale":"","width":1280,"height":900},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3816001,"resolution":"3","location":"assets","locale":"","width":1280,"height":900}},"screenshots":{"1":"Preview the posts without a featured image, and the image each one will get.","2":"Fill old posts in batches with a progress bar, and undo it in one click.","3":"Every post gets a featured image: the first image in its content, or your fallback image."}},"plugin_section":[],"plugin_tags":[9512,3236,1795,2894,1326],"plugin_category":[50],"plugin_contributors":[241539],"plugin_business_model":[],"class_list":["post-408684","plugin","type-plugin","status-publish","hentry","plugin_tags-auto-featured-image","plugin_tags-bulk","plugin_tags-featured-image","plugin_tags-post-thumbnail","plugin_tags-thumbnail","plugin_category-media","plugin_contributors-reinventwp","plugin_committers-reinventwp"],"banners":{"banner":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/banner-772x250.png?rev=3816001","banner_2x":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/banner-1544x500.png?rev=3816001","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/icon-128x128.png?rev=3816001","icon_2x":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/icon-256x256.png?rev=3816001","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/screenshot-1.png?rev=3816001","caption":"Preview the posts without a featured image, and the image each one will get."},{"src":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/screenshot-2.png?rev=3816001","caption":"Fill old posts in batches with a progress bar, and undo it in one click."},{"src":"https:\/\/ps.w.org\/reinvent-auto-featured-image\/assets\/screenshot-3.png?rev=3816001","caption":"Every post gets a featured image: the first image in its content, or your fallback image."}],"raw_content":"<!--section=description-->\n<p>Posts without a featured image leave gaps in your blog grid, archives and social shares. Reinvent Auto Featured Image fills them: each post gets the first image in its content, or a fallback image you choose.<\/p>\n\n<p>It's built to be safe. You see what each post will get before anything changes, you choose which post types it touches, and one click undoes everything it did.<\/p>\n\n<h4>Everything is free<\/h4>\n\n<ul>\n<li><strong>When you save a post<\/strong> without a featured image, the first image in its content becomes the featured image.<\/li>\n<li><strong>Fallback image.<\/strong> Posts with no image in their content get the image you choose.<\/li>\n<li><strong>Fill old posts.<\/strong> Fix hundreds of older posts at once, in batches with a progress bar, so large sites don't time out.<\/li>\n<li><strong>Preview first.<\/strong> See how many posts have no featured image, and which image each of the newest ones will get, before you fill anything.<\/li>\n<li><strong>Choose the post types.<\/strong> Posts only by default; add pages, products or any other post type that supports featured images.<\/li>\n<li><strong>One-click undo.<\/strong> Removes only the featured images this plugin set, and only where the post still uses them.<\/li>\n<\/ul>\n\n<h4>Safe by design<\/h4>\n\n<ul>\n<li>Featured images you picked yourself are never changed or removed.<\/li>\n<li>If you remove a featured image the plugin set, it isn't added back to that post.<\/li>\n<li>Only images in your Media Library are used. Nothing is downloaded from other sites.<\/li>\n<li>Your posts' content is never edited.<\/li>\n<li>No tracking. An optional site report is sent only if you allow it.<\/li>\n<\/ul>\n\n<h3>External services<\/h3>\n\n<p>The plugin works on your own server, with the images in your Media Library. Your images and posts are never uploaded anywhere. The plugin connects to one external service, operated by us:<\/p>\n\n<p><strong>Reinvent WP Services<\/strong> (services.reinventwp.com), used for three things:<\/p>\n\n<ol>\n<li>The list of Reinvent WP apps on the <strong>Reinvent WP \u2192 Dashboard<\/strong> page. When an administrator opens that page, your site downloads the current list at most once a day and keeps a copy. Nothing about your site or you is sent.<\/li>\n<li>The assistant (the <strong>Describe a problem with your site<\/strong> field) on the <strong>Reinvent WP \u2192 Dashboard<\/strong> page and on this plugin's page. Nothing is sent until you open it; then your site asks whether the assistant is available. When you send a question, it is sent with any screenshots or text files you attach to it (of a file, only its newest part, with emails, IP addresses, passwords and keys hidden by your browser first), the last few messages of the conversation and the list of Reinvent WP plugins on your site (whether each is active, inactive or not installed, and its version), so the answer can point to the right plugin and setting. Nothing is stored; the conversation stays in your browser tab. If you send feedback from the assistant's form, your email, site address and message go to the Reinvent WP team, like the feedback form.<\/li>\n<li>Site report (only if you allow it). To improve the plugin and help us debug when you report an error. Nothing is sent until an administrator clicks \"Allow\" on the plugin's admin page or turns on <strong>Site report<\/strong> in its settings. After that, the plugin's admin page sends your site address, the admin email, the plugin version and the plugin's settings (no passwords or keys) when the page loads and when you save the settings, and one short report when the plugin is deactivated or deleted. Turning <strong>Site report<\/strong> off sends one last report that says so, then nothing. Visitors' data and your files are never sent, and local or development sites send nothing.<\/li>\n<\/ol>\n\n<p>Reinvent WP Services: <a href=\"https:\/\/reinventwp.com\/terms-and-conditions\">Terms of use<\/a>, <a href=\"https:\/\/reinventwp.com\/privacy\">Privacy policy<\/a>.<\/p>\n\n<h3>Source Code<\/h3>\n\n<p>The Reinvent WP \u2192 Dashboard page and the assistant (<code>public\/hub<\/code>) are built from https:\/\/github.com\/reinventwp\/reinventwp-apps.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from <strong>Plugins \u2192 Add New<\/strong>, or upload the zip.<\/li>\n<li>Activate it. New and updated posts without a featured image now get one.<\/li>\n<li>To fill older posts, go to <strong>Media \u2192 Auto Featured Image<\/strong>, check the preview, then click <strong>Fill posts<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20image%20does%20it%20pick%3F\"><h3>Which image does it pick?<\/h3><\/dt>\n<dd><p>The first image in the post's content that is in your Media Library: an image block, a gallery, a cover block, or a classic editor image. If the post has none, it uses your fallback image. If you haven't chosen one, the post stays without a featured image.<\/p><\/dd>\n<dt id=\"will%20it%20replace%20featured%20images%20i%20already%20set%3F\"><h3>Will it replace featured images I already set?<\/h3><\/dt>\n<dd><p>No. It only fills posts that have no featured image.<\/p><\/dd>\n<dt id=\"can%20i%20undo%20it%3F\"><h3>Can I undo it?<\/h3><\/dt>\n<dd><p>Yes. On <strong>Media \u2192 Auto Featured Image<\/strong>, <strong>Undo<\/strong> removes the featured images this plugin set, and only where the post still uses that image. If you changed a post's featured image yourself, it stays.<\/p><\/dd>\n<dt id=\"will%20it%20add%20images%20to%20my%20pages%20too%3F\"><h3>Will it add images to my pages too?<\/h3><\/dt>\n<dd><p>Only if you tick <strong>Pages<\/strong> in the settings. By default it only fills posts.<\/p><\/dd>\n<dt id=\"what%20about%20images%20hosted%20on%20other%20sites%3F\"><h3>What about images hosted on other sites?<\/h3><\/dt>\n<dd><p>They're skipped. Only images in your Media Library are used, so nothing is downloaded.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20block%20editor%2C%20the%20classic%20editor%20and%20page%20builders%3F\"><h3>Does it work with the block editor, the classic editor and page builders?<\/h3><\/dt>\n<dd><p>It reads the post content saved by any editor. Images added by a page builder count when they're Media Library images in the post content.<\/p><\/dd>\n<dt id=\"does%20it%20send%20any%20data%20anywhere%3F\"><h3>Does it send any data anywhere?<\/h3><\/dt>\n<dd><p>Your posts and images never leave your site: everything the plugin does with them happens on your own server. The <strong>Reinvent WP \u2192 Dashboard<\/strong> page downloads the list of Reinvent WP apps, and the assistant sends the questions you ask it. The plugin's page also asks whether you'd like to share a short site report; nothing is sent unless you click \"Allow\", and you can turn it off anytime under <strong>Privacy \u2192 Site report<\/strong>. See External services.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>New: describe a problem with your site on the Reinvent WP \u2192 Dashboard page or on this plugin's page, and the assistant suggests the Reinvent WP app that fixes it. On this plugin's page it can also change the post types and the \"When saving\" setting for you, after you approve.<\/li>\n<li>New: the Reinvent WP \u2192 Dashboard page shows your Reinvent WP apps first, then the others you can install, from an up-to-date list (read once a day, with a built-in list as fallback).<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added an optional site report, sent only if you allow it.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Give every post a featured image from its first image or a fallback image. Preview first, fill old posts, and undo in one click.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/408684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=408684"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/reinventwp"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=408684"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=408684"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=408684"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=408684"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=408684"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=408684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}