{"action":"created","issue":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/325","repository_url":"https://api.github.com/repos/netlify/netlify-cms","labels_url":"https://api.github.com/repos/netlify/netlify-cms/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/netlify/netlify-cms/issues/325/comments","events_url":"https://api.github.com/repos/netlify/netlify-cms/issues/325/events","html_url":"https://github.com/netlify/netlify-cms/issues/325","id":217332698,"number":325,"title":"'relative path' field for uploaded images","user":{"login":"MarcCoet","id":16718691,"avatar_url":"https://avatars1.githubusercontent.com/u/16718691?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcCoet","html_url":"https://github.com/MarcCoet","followers_url":"https://api.github.com/users/MarcCoet/followers","following_url":"https://api.github.com/users/MarcCoet/following{/other_user}","gists_url":"https://api.github.com/users/MarcCoet/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcCoet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcCoet/subscriptions","organizations_url":"https://api.github.com/users/MarcCoet/orgs","repos_url":"https://api.github.com/users/MarcCoet/repos","events_url":"https://api.github.com/users/MarcCoet/events{/privacy}","received_events_url":"https://api.github.com/users/MarcCoet/received_events","type":"User","site_admin":false},"labels":[{"id":783333654,"url":"https://api.github.com/repos/netlify/netlify-cms/labels/area:%20asset-management","name":"area: asset-management","color":"fbca04","default":false},{"id":783301023,"url":"https://api.github.com/repos/netlify/netlify-cms/labels/area:%20configuration","name":"area: configuration","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":36,"created_at":"2017-03-27T18:23:23Z","updated_at":"2018-04-10T20:42:18Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI am starting to use Netlify CMS with Gatsby 1.0.\r\nI need a relative path to fetch pictures with the graphQL layer. So in my frontmatter I would like to have a field like:\r\n`fieldName: ../images/myImage.jpg`\r\nOf course the last part (\"myImage.jpg\") would be different for each entry depending on the file I upload.\r\n\r\nIs there a way to auto generate a string field in the frontmatter that would concatenate a string of my choice (for example '../images/') with the name of a picture I may upload in an image field of the same entry ?\r\n\r\nI also tried to set:\r\n`public_folder: \"../images\"`\r\nThis would theoretically change all my image fields in all collections to get that leading string in the file path but when I create a new file with the CMS I get an auto opening '/'... So in my frontmatter:\r\n`image: /../images/myImage.jpg`\r\ninstead of\r\n`image: ../images/myImage.jpg`\r\nOf course this breaks my groove as well.\r\n\r\nWhat is the best way to get around this issue?"},"comment":{"url":"https://api.github.com/repos/netlify/netlify-cms/issues/comments/380239860","html_url":"https://github.com/netlify/netlify-cms/issues/325#issuecomment-380239860","issue_url":"https://api.github.com/repos/netlify/netlify-cms/issues/325","id":380239860,"user":{"login":"danielmahon","id":1088089,"avatar_url":"https://avatars2.githubusercontent.com/u/1088089?v=4","gravatar_id":"","url":"https://api.github.com/users/danielmahon","html_url":"https://github.com/danielmahon","followers_url":"https://api.github.com/users/danielmahon/followers","following_url":"https://api.github.com/users/danielmahon/following{/other_user}","gists_url":"https://api.github.com/users/danielmahon/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmahon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmahon/subscriptions","organizations_url":"https://api.github.com/users/danielmahon/orgs","repos_url":"https://api.github.com/users/danielmahon/repos","events_url":"https://api.github.com/users/danielmahon/events{/privacy}","received_events_url":"https://api.github.com/users/danielmahon/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T20:42:18Z","updated_at":"2018-04-10T20:42:18Z","author_association":"NONE","body":"@brendan-hurley [Open an issue](https://github.com/danielmahon/gatsby-remark-relative-images) and include a sample markdown string you're trying to parse, and I'll take a look. Trying not to hijack this thread :wink:"}}
{"actor":{"display_login":"danielmahon"}}