{"id":17446,"date":"2010-10-25T08:00:00","date_gmt":"2010-10-25T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/automatic-thumbnail-generator\/"},"modified":"2010-10-25T17:49:00","modified_gmt":"2010-10-25T17:49:00","slug":"automatic-thumbnail-generator","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/automatic-thumbnail-generator\/","title":{"rendered":"Automatic Thumbnail Generator"},"content":{"rendered":"<p>This plugin will scan your thumbnail-less posts and look for a suitable image to use as a thumbnail.<br \/>\nIt will look for images linked in the post content and will download and add them to the local library.<br \/>\nPost scanning is performed only when <code>the_post_thumbnail<\/code> or <code>get_the_post_thumbnail<\/code> are called for<br \/>\nthat particular post.<\/p>\n<p>So you designed your new thumbnail-based template, but you have tons of thumbnail-less posts and<br \/>\ndon\u2019t want to spend too much time on scraping your old posts for a thumbnail picture. Maybe you<br \/>\nthink you will probably forget to set a thumbnail for your new posts. Maybe both, as was my case :).<\/p>\n<p>When a thumbnail for a post is queried and nothing is found this plugin will scrape the post for<br \/>\nan <code><img><\/code> tag and its <code>href<\/code> property. Once a suitabile image is found (based on the configured<br \/>\nsettings), it will be downloaded ad set as the post thumbnail. If no suitable image is found,<br \/>\na default one will be used.<\/p>\n<p>This plugin is still in early development state. It just covers my needs (see the \u201cTo do\u201d section<br \/>\nfor more details). It has been tested only with wordpress 3.0.1, but should work also with 2.9,<br \/>\nsince I used similar code with 2.9 (even if it was included in my template\u2019s <code>functions.php<\/code>).<\/p>\n<p>The plugin is not supported. This doesn\u2019t mean that I will not look into submitted bugs. Anyway,<br \/>\ndon\u2019t expect prompt answers, since this is done in my spare time.<\/p>\n<h3>To do<\/h3>\n<p>Many things should be done in future releases. Here are some:<\/p>\n<ul>\n<li>Current version always downloads selected linked images. This works good with images hosted on external sites.<br \/>\nIf your posts link to images hosted in your media library, you will end up with two images.<\/li>\n<li>A more user friendly name should be used for images added to the library (e.g. Thumbnail for post \u2026)<\/li>\n<li>Somewhere, a button to reset the \u201cpreviously scanned\u201d status of all posts should be provided (on current version,<br \/>\nyou cas set or reset it for single posts in the edit page.<\/li>\n<li>\u201cpreviously scanned\u201d status should probably be reset (or at least you should be asked to) when publishing a<br \/>\nupdating an existing post<\/li>\n<\/ul>\n<p>More ideas are wellcome.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automated on-demand generation of posts thumbnails.<\/p>\n","protected":false},"author":65,"featured_media":237632,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Automatic Thumbnail Generator - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Automated on-demand generation of posts thumbnails."},"footnotes":""},"categories":[1],"tags":[223,542,986],"class_list":["post-17446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-image","tag-posts","tag-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/17446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=17446"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/17446\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/237632"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=17446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=17446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=17446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}