{"action":"created","issue":{"url":"https://api.github.com/repos/dompdf/dompdf/issues/1016","labels_url":"https://api.github.com/repos/dompdf/dompdf/issues/1016/labels{/name}","comments_url":"https://api.github.com/repos/dompdf/dompdf/issues/1016/comments","events_url":"https://api.github.com/repos/dompdf/dompdf/issues/1016/events","html_url":"https://github.com/dompdf/dompdf/issues/1016","id":105958847,"number":1016,"title":"White space in data-uri breaks image rendering","user":{"login":"joanebrown","id":12473135,"avatar_url":"https://avatars.githubusercontent.com/u/12473135?v=3","gravatar_id":"","url":"https://api.github.com/users/joanebrown","html_url":"https://github.com/joanebrown","followers_url":"https://api.github.com/users/joanebrown/followers","following_url":"https://api.github.com/users/joanebrown/following{/other_user}","gists_url":"https://api.github.com/users/joanebrown/gists{/gist_id}","starred_url":"https://api.github.com/users/joanebrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanebrown/subscriptions","organizations_url":"https://api.github.com/users/joanebrown/orgs","repos_url":"https://api.github.com/users/joanebrown/repos","events_url":"https://api.github.com/users/joanebrown/events{/privacy}","received_events_url":"https://api.github.com/users/joanebrown/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dompdf/dompdf/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-11T07:32:33Z","updated_at":"2015-09-13T06:49:09Z","closed_at":null,"body":"How to use a data uri scheme image with dompdf?\r\n\r\nI tried to use it directly and I see the image, but only when I see the html page directly:\r\n\r\n```\r\n<img width=\"200\" height=\"50\" src=\"<?php echo 'data:image/jpeg;base64,' . base64_encode($image->mydatauri); ?>\"/>\r\n```\r\n\r\nbut it returns the next error, when I create the PDF:\r\n\r\n> Image type unknown\r\n\r\nWhat's the problem? I already set `DOMPDF_ENABLE_REMOTE` to true.\r\n\r\nThanks :)"},"comment":{"url":"https://api.github.com/repos/dompdf/dompdf/issues/comments/139847275","html_url":"https://github.com/dompdf/dompdf/issues/1016#issuecomment-139847275","issue_url":"https://api.github.com/repos/dompdf/dompdf/issues/1016","id":139847275,"user":{"login":"joanebrown","id":12473135,"avatar_url":"https://avatars.githubusercontent.com/u/12473135?v=3","gravatar_id":"","url":"https://api.github.com/users/joanebrown","html_url":"https://github.com/joanebrown","followers_url":"https://api.github.com/users/joanebrown/followers","following_url":"https://api.github.com/users/joanebrown/following{/other_user}","gists_url":"https://api.github.com/users/joanebrown/gists{/gist_id}","starred_url":"https://api.github.com/users/joanebrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanebrown/subscriptions","organizations_url":"https://api.github.com/users/joanebrown/orgs","repos_url":"https://api.github.com/users/joanebrown/repos","events_url":"https://api.github.com/users/joanebrown/events{/privacy}","received_events_url":"https://api.github.com/users/joanebrown/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T06:49:09Z","updated_at":"2015-09-13T06:49:09Z","body":"Oh, i see...\r\n\r\nMay you have a little solution for that? I tried with the next `preg_replace` to remove all break spaces:\r\n\r\n`<img width=\"200\" height=\"50\" src=\"<?php echo 'data:image/jpeg;base64,' . preg_replace('~\\x{00a0}~', '', base64_encode($image->mydatauri)); ?>\"/>`\r\n\r\nBut doesn't work :S"}}