{"action":"created","issue":{"url":"https://api.github.com/repos/dolanmiu/docx/issues/91","repository_url":"https://api.github.com/repos/dolanmiu/docx","labels_url":"https://api.github.com/repos/dolanmiu/docx/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/dolanmiu/docx/issues/91/comments","events_url":"https://api.github.com/repos/dolanmiu/docx/issues/91/events","html_url":"https://github.com/dolanmiu/docx/issues/91","id":338651839,"node_id":"MDU6SXNzdWUzMzg2NTE4Mzk=","number":91,"title":"How to add an image from a buffer into a document?","user":{"login":"madarche","id":152407,"node_id":"MDQ6VXNlcjE1MjQwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/152407?v=4","gravatar_id":"","url":"https://api.github.com/users/madarche","html_url":"https://github.com/madarche","followers_url":"https://api.github.com/users/madarche/followers","following_url":"https://api.github.com/users/madarche/following{/other_user}","gists_url":"https://api.github.com/users/madarche/gists{/gist_id}","starred_url":"https://api.github.com/users/madarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madarche/subscriptions","organizations_url":"https://api.github.com/users/madarche/orgs","repos_url":"https://api.github.com/users/madarche/repos","events_url":"https://api.github.com/users/madarche/events{/privacy}","received_events_url":"https://api.github.com/users/madarche/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-05T16:50:41Z","updated_at":"2018-07-05T16:52:05Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm using docx@3.6.0.\r\n\r\nThe code below returns `doc.createDrawing is not a function` : \r\n\r\n```javascript\r\nconst doc = new docx.Document();\r\nconst paragraph = new docx.Paragraph('Some text.');\r\nparagraph.addRun(new docx.TextRun('Some text run.'));\r\ndoc.addParagraph(paragraph);\r\nconst buff = fs.readFileSync('/tmp/w3c_home.png');\r\nconst image_data = doc.createImageData('Dummy dummy', buff);\r\ndoc.createDrawing(image_data);\r\n```\r\n\r\nWhat am I doing wrong?"},"comment":{"url":"https://api.github.com/repos/dolanmiu/docx/issues/comments/402786045","html_url":"https://github.com/dolanmiu/docx/issues/91#issuecomment-402786045","issue_url":"https://api.github.com/repos/dolanmiu/docx/issues/91","id":402786045,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjc4NjA0NQ==","user":{"login":"madarche","id":152407,"node_id":"MDQ6VXNlcjE1MjQwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/152407?v=4","gravatar_id":"","url":"https://api.github.com/users/madarche","html_url":"https://github.com/madarche","followers_url":"https://api.github.com/users/madarche/followers","following_url":"https://api.github.com/users/madarche/following{/other_user}","gists_url":"https://api.github.com/users/madarche/gists{/gist_id}","starred_url":"https://api.github.com/users/madarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madarche/subscriptions","organizations_url":"https://api.github.com/users/madarche/orgs","repos_url":"https://api.github.com/users/madarche/repos","events_url":"https://api.github.com/users/madarche/events{/privacy}","received_events_url":"https://api.github.com/users/madarche/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T16:52:05Z","updated_at":"2018-07-05T16:52:05Z","author_association":"NONE","body":"Maybe related to #89"}}
{"actor":{"display_login":"madarche"}}