Auto Post Thumbnail
Relative paths? (4 posts)

  1. FolioVision
    Posted 4 years ago #


    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.



  2. FolioVision
    Posted 4 years ago #

    2. For this, you will have to check if the post is revision:

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


  3. adityamooley
    Plugin Contributor

    Posted 4 years ago #

    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.


  4. garfy
    Posted 4 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Auto Post Thumbnail
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic