Autoblog plugin does not copy images to the local server.

I installed Autoblog plugin and I'm feeding a few RSS feeds into the blog with success. However, when the post have an image, the automatically created articles show the image being served from the original RSS feed server. How do I setup the plugin to automatically copy the images so I serve them locally?

  • aecnu
    • WP Unicorn

    Greetings rayvellest,

    Welcome to WPMU Dev!

    I installed Autoblog plugin and I'm feeding a few RSS feeds into the blog with success. However, when the post have an image, the automatically created articles show the image being served from the original RSS feed server. How do I setup the plugin to automatically copy the images so I serve them locally?

    This is a great question and to the best of my knowledge it is not possible to do with Autoblog plugin alone.

    However, I may have a solution, have you tried Add image to Post plugin?

    I think this could definitely do the job for you working with Autoblog plugin to give you the images you desire into a location on your server - and I would love to hear how it goes if you try it out.

    Cheers, Joe :slight_smile:

  • Ray
    • Flash Drive

    Joe, the plugin you are suggesting wouldn't solve my problem. On a matter of fact, I've just find Add Linked Images to Gallery plugin which may solve my problem, but it's buggy and incompatible with Custom Upload Dir plugin I use. Apparently this plugins, combined with Autoblog, will do exactly what I'm looking for, but I lack the skills to fix the bug and make them compatible. I'm not as good of a developer as I wanted to be, so do you think is fixable? What do you suggest me doing?

  • aecnu
    • WP Unicorn

    Greetings rayvellest,

    This is a very interesting problem indeed.

    The main problem here is trying to find a solution that will be compatible of course with your current sites plugins and do the duty of pulling those graphics into your site storing them and not linking to the source URL - very tricky.

    At this point what I am going to do is bring in a higher authority - our lead developer to see if he has any comments or advise he can offer us to solve this issue.

    It may take a little longer then a normal ticket but I'll see if I can get him in here asap.

    Cheers, Joe :slight_smile:

  • Ray
    • Flash Drive

    Hi Barry,

    I'll take a good look at this plugins, but apparently they are going to solve my problem, and as long they are compatible with Custom Upload Dir plugin, I'm very happy with that.

    But I believe this is a significant missing feature for the current Auto Blog plugin. Considering there are many talented people working over WPMUDEV, I think that's going to be something piece of cake for you guys to work on. Hope it soon, just to make my life easier.

    Thanks for the feedback, it's very much appreciated! :slight_smile:

  • Jason
    • The Incredible Code Injector

    I wrote a similar plugin to import feeds to custom post types and I used this to save the images from feeds to the post

    This is a filter that you run (In the plugin) AFTER you've inserted the post...

    if (isset($IMG_URL) {
    $upload_dir = wp_upload_dir();
    $image_data = file_get_contents($IMG_URL);
    $filename = basename($IMG_URL);
    if(wp_mkdir_p($upload_dir['path']))
    $file = $upload_dir['path'] . '/' . $filename;
    else
    $file = $upload_dir['basedir'] . '/' . $filename;
    file_put_contents($file, $image_data);

    $wp_filetype = wp_check_filetype($filename, null );
    $attachment = array(
    'post_mime_type' => $wp_filetype['type'],
    'post_title' => sanitize_file_name($filename),
    'post_content' => '',
    'post_status' => 'inherit'
    );
    $attach_id = wp_insert_attachment( $attachment, $file, $post_id );
    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
    wp_update_attachment_metadata( $attach_id, $attach_data );

    set_post_thumbnail( $post_id, $attach_id );
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.