{"action":"created","issue":{"url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/17","labels_url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/17/comments","events_url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/17/events","html_url":"https://github.com/open-xml-templating/docxtemplater-image-module/issues/17","id":90489921,"number":17,"title":"Can't get the image to render","user":{"login":"girishgoudapatil","id":4410031,"avatar_url":"https://avatars.githubusercontent.com/u/4410031?v=3","gravatar_id":"","url":"https://api.github.com/users/girishgoudapatil","html_url":"https://github.com/girishgoudapatil","followers_url":"https://api.github.com/users/girishgoudapatil/followers","following_url":"https://api.github.com/users/girishgoudapatil/following{/other_user}","gists_url":"https://api.github.com/users/girishgoudapatil/gists{/gist_id}","starred_url":"https://api.github.com/users/girishgoudapatil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girishgoudapatil/subscriptions","organizations_url":"https://api.github.com/users/girishgoudapatil/orgs","repos_url":"https://api.github.com/users/girishgoudapatil/repos","events_url":"https://api.github.com/users/girishgoudapatil/events{/privacy}","received_events_url":"https://api.github.com/users/girishgoudapatil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-23T21:03:16Z","updated_at":"2015-06-24T07:01:24Z","closed_at":null,"body":"I am trying the render the images in the docx via docxtemplater, below is my code snippet,\r\n\r\n```\r\nangular.module('xxxxx').factory('DocxTemplate', [function() {\r\n    var loadFile=function(url,callback){\r\n        JSZipUtils.getBinaryContent(url,callback);\r\n    };\r\n    var angularParser= function(tag){\r\n        var expr = expressions.compile(tag);\r\n        return {get:expr};\r\n    };\r\n    var imageModule = new DocxImageModule();\r\n    return {\r\n        genrateDocx : function (template, data, orgUnit, image) {\r\n            image = image || null;\r\n            loadFile('/assets/templates/'+template,function(err,content){\r\n                if (err) { \r\n                    throw err;\r\n                }\r\n                var doc = new Docxgen();\r\n                if (image) {\r\n                    doc.attachModule(imageModule);\r\n                }\r\n                doc.load(content);\r\n                doc.setOptions({parser:angularParser});\r\n                var templateData = {\r\n                    'data' : data,\r\n                    'orgName' : orgUnit.orgName\r\n                };\r\n                if (image) {\r\n                    templateData.image = '/assets/images/matrix.jpeg';\r\n                }\r\n                doc.setData(templateData);\r\n                doc.render();\r\n                var out = doc.getZip().generate({type:'blob'});\r\n                var arrayString = template.split('.');\r\n                saveAs(out, arrayString[0] +'-'+new Date().toLocaleString()+'.docx');\r\n            });\r\n        }\r\n    };\r\n}]);\r\n```\r\n\r\nTemplate\r\n\r\n```\r\nOrganisation Unit : {orgName}\r\n{%image}\r\n\r\n```\r\n\r\nI am loading the image from the local and I even tried with a absolute path , but the image doesn't seems load , could someone please help me with this ? \r\n"},"comment":{"url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/comments/114753080","html_url":"https://github.com/open-xml-templating/docxtemplater-image-module/issues/17#issuecomment-114753080","issue_url":"https://api.github.com/repos/open-xml-templating/docxtemplater-image-module/issues/17","id":114753080,"user":{"login":"edi9999","id":2071336,"avatar_url":"https://avatars.githubusercontent.com/u/2071336?v=3","gravatar_id":"","url":"https://api.github.com/users/edi9999","html_url":"https://github.com/edi9999","followers_url":"https://api.github.com/users/edi9999/followers","following_url":"https://api.github.com/users/edi9999/following{/other_user}","gists_url":"https://api.github.com/users/edi9999/gists{/gist_id}","starred_url":"https://api.github.com/users/edi9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi9999/subscriptions","organizations_url":"https://api.github.com/users/edi9999/orgs","repos_url":"https://api.github.com/users/edi9999/repos","events_url":"https://api.github.com/users/edi9999/events{/privacy}","received_events_url":"https://api.github.com/users/edi9999/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T07:01:24Z","updated_at":"2015-06-24T07:01:24Z","body":"You have to specify `getImageFromData` https://github.com/open-xml-templating/docxtemplater-image-module/issues/16"}}