{"action":"created","issue":{"url":"https://api.github.com/repos/andrewdavey/postal/issues/109","labels_url":"https://api.github.com/repos/andrewdavey/postal/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/andrewdavey/postal/issues/109/comments","events_url":"https://api.github.com/repos/andrewdavey/postal/issues/109/events","html_url":"https://github.com/andrewdavey/postal/issues/109","id":59191765,"number":109,"title":"Style attribute for embedded image","user":{"login":"denisz1","id":9254057,"avatar_url":"https://avatars.githubusercontent.com/u/9254057?v=3","gravatar_id":"","url":"https://api.github.com/users/denisz1","html_url":"https://github.com/denisz1","followers_url":"https://api.github.com/users/denisz1/followers","following_url":"https://api.github.com/users/denisz1/following{/other_user}","gists_url":"https://api.github.com/users/denisz1/gists{/gist_id}","starred_url":"https://api.github.com/users/denisz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisz1/subscriptions","organizations_url":"https://api.github.com/users/denisz1/orgs","repos_url":"https://api.github.com/users/denisz1/repos","events_url":"https://api.github.com/users/denisz1/events{/privacy}","received_events_url":"https://api.github.com/users/denisz1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-27T05:22:17Z","updated_at":"2015-03-25T13:14:36Z","closed_at":null,"body":"When styling emails, it is necessary to use inline styles in the `style` attribute, because webmail services (gmail and friends) strip out stylesheets.\r\n\r\nThe `@Html.EmbedImage` extension method can render the `alt` attribute, but not a `style` attribute. So I can't style my images.\r\n\r\nThe signature could be changed from:\r\n```cs\r\npublic static IHtmlString EmbedImage(this HtmlHelper html, string imagePathOrUrl, string alt = \"\")\r\n```\r\nto:\r\n\r\n```cs\r\npublic static IHtmlString EmbedImage(this HtmlHelper html, string imagePathOrUrl, string alt = \"\", string style= \"\")\r\n```\r\n\r\nAnd the final line from:\r\n\r\n```cs\r\nreturn new HtmlString(string.Format(\"<img src=\\\"cid:{0}\\\" alt=\\\"{1}\\\"/>\", linkedResource.ContentId, html.AttributeEncode(alt)));\r\n```\r\nto:\r\n\r\n```cs\r\nreturn new HtmlString(string.Format(\"<img src=\\\"cid:{0}\\\" alt=\\\"{1}\\\" style=\"{2}\"/>\", linkedResource.ContentId, html.AttributeEncode(alt), html.AttributeEncode(style)));\r\n```\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/andrewdavey/postal/issues/comments/86018027","html_url":"https://github.com/andrewdavey/postal/issues/109#issuecomment-86018027","issue_url":"https://api.github.com/repos/andrewdavey/postal/issues/109","id":86018027,"user":{"login":"4tron","id":11210554,"avatar_url":"https://avatars.githubusercontent.com/u/11210554?v=3","gravatar_id":"","url":"https://api.github.com/users/4tron","html_url":"https://github.com/4tron","followers_url":"https://api.github.com/users/4tron/followers","following_url":"https://api.github.com/users/4tron/following{/other_user}","gists_url":"https://api.github.com/users/4tron/gists{/gist_id}","starred_url":"https://api.github.com/users/4tron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4tron/subscriptions","organizations_url":"https://api.github.com/users/4tron/orgs","repos_url":"https://api.github.com/users/4tron/repos","events_url":"https://api.github.com/users/4tron/events{/privacy}","received_events_url":"https://api.github.com/users/4tron/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T13:14:36Z","updated_at":"2015-03-25T13:14:36Z","body":"Could also strip the helper so that it is only a uri. That way you could write the style in a <img> tag\r\n\r\nlike\r\n <img src=@Html.EmbedImageScr(\"~/imgfolder/img.png\" style=\"width:89px;\" alt=\"name\" />"}}