{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5072","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5072/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5072/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5072/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/5072","id":316523762,"number":5072,"title":"gatsby-plugin-sharp – toFormat not flexible enough","user":{"login":"signalwerk","id":992878,"avatar_url":"https://avatars1.githubusercontent.com/u/992878?v=4","gravatar_id":"","url":"https://api.github.com/users/signalwerk","html_url":"https://github.com/signalwerk","followers_url":"https://api.github.com/users/signalwerk/followers","following_url":"https://api.github.com/users/signalwerk/following{/other_user}","gists_url":"https://api.github.com/users/signalwerk/gists{/gist_id}","starred_url":"https://api.github.com/users/signalwerk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/signalwerk/subscriptions","organizations_url":"https://api.github.com/users/signalwerk/orgs","repos_url":"https://api.github.com/users/signalwerk/repos","events_url":"https://api.github.com/users/signalwerk/events{/privacy}","received_events_url":"https://api.github.com/users/signalwerk/received_events","type":"User","site_admin":false},"labels":[{"id":214544677,"url":"https://api.github.com/repos/gatsbyjs/gatsby/labels/%F0%9F%8F%B7%20type:%20question%20or%20discussion","name":"🏷 type: question or discussion","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-21T20:42:38Z","updated_at":"2018-04-23T13:51:44Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi! I'd like to have TIFF-images in my markdown-files: `![image test](./test.tif)`. This actually already works more or less (#5071) when I take the `gatsby-remark-images` package and run it like that:\r\n\r\n```JS\r\n// gatsby-config.js\r\n{\r\n  resolve: 'gatsby-transformer-remark',\r\n  options: {\r\n    plugins: [\r\n      {\r\n        resolve: 'gatsby-remark-images',\r\n        options: {\r\n          toFormat: \"JPG\", // ←––––––– HERE\r\n        }\r\n      },\r\n    ],\r\n  },\r\n},\r\n```\r\nCool. But now my png-files are also converted to jpeg-files. Any idea how we should implement a more detailed handling. My first thought:\r\n\r\n`toFormat: <string> | <object>`\r\n\r\nSo we can have the backward-compatible defintion\r\n```\r\noptions: {\r\n  toFormat: \"JPG\",\r\n}\r\n```\r\n\r\nor new:\r\n```\r\noptions: {\r\n  toFormat: {\r\n    '*': 'JPG',\r\n    'PNG': 'PNG',\r\n    'JPG': 'JPG',\r\n  },\r\n}\r\n```\r\n\r\nsecond thoght would be to indicate that in markdown:\r\n\r\n`![image test](./test.tif?toFormat:JPG)`\r\n\r\nI think the `options`-solution is more elegant.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/383582637","html_url":"https://github.com/gatsbyjs/gatsby/issues/5072#issuecomment-383582637","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5072","id":383582637,"user":{"login":"m-allanson","id":381801,"avatar_url":"https://avatars1.githubusercontent.com/u/381801?v=4","gravatar_id":"","url":"https://api.github.com/users/m-allanson","html_url":"https://github.com/m-allanson","followers_url":"https://api.github.com/users/m-allanson/followers","following_url":"https://api.github.com/users/m-allanson/following{/other_user}","gists_url":"https://api.github.com/users/m-allanson/gists{/gist_id}","starred_url":"https://api.github.com/users/m-allanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-allanson/subscriptions","organizations_url":"https://api.github.com/users/m-allanson/orgs","repos_url":"https://api.github.com/users/m-allanson/repos","events_url":"https://api.github.com/users/m-allanson/events{/privacy}","received_events_url":"https://api.github.com/users/m-allanson/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T13:51:44Z","updated_at":"2018-04-23T13:51:44Z","author_association":"CONTRIBUTOR","body":"Yeah that could be an option too, just picking a format to convert to."}}
{"actor":{"display_login":"m-allanson"}}