Support » Plugin: Auto Post Thumbnail » [Plugin: Auto Post Thumbnail] Relative paths?

  • Hello,

    this is a great idea and a nice plugin.

    1. could you please add some code into the plugin, that it would work well even with the relative paths? Say that I have the image as /images/2011/05/apple.png. Then curl_get_file_contents() or file_get_contents() fails to fetch it in apt_generate_post_thumb(). Just adding site domain name in front of $imageUrl would fix the issue.

    Without this, it barely works for us, as we convert sites from other blog system a lot and they often use relative paths.

    2. Also, it would be nice, if it worked even on save_post, not only on publish_post.


Viewing 3 replies - 1 through 3 (of 3 total)
  • 2. For this, you will have to check if the post is revision:

    `if( wp_is_post_revision($post_id) ) {
    return true;
    } `


    Thanks for the suggestions. Point #1 is really something I would look to add in the plugin.

    About point #2, I am not sure whether its a good idea since we will also have to show the featured image once its created. And it will require some more changes. And finally, the basic idea behind the plugin was to create the featured image only when the post is published so that the user gets the opportunity to set own featured image.


    i have build wp in local host, 200 articles, now all thumbs are still ponting to local host, why you did not use relative paths???

    you know many people work in xampp dont you?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Auto Post Thumbnail] Relative paths?’ is closed to new replies.