title: Insert an image to wordpress post
body: <p>How can I insert an image from url to wordpress? I use the code below to insert a post. I don't want to just attach thumbnail.</p>
  
  <pre><code>def write_post_to_wordpress(summary,title, keywords, category):
      date_now=str(datetime.datetime.today())[:-10]
      date_created = xmlrpclib.DateTime(
          datetime.datetime.strptime(str(date_now), "%Y-%m-%d %H:%M")
      )
      categories = [category]
      data = {
          'title': title,
          'description': summary,
          'dateCreated': date_created, 
          'categories': categories,
          'mt_keywords': keywords
      }
      post_id = server.metaWeblog.newPost(
          wp_blogid,
          wp_username,
          wp_password,
          data,
          status_published
      )
      return post_id
  </code></pre>