{"action":"opened","issue":{"url":"https://api.github.com/repos/wp-media/wp-rocket/issues/398","repository_url":"https://api.github.com/repos/wp-media/wp-rocket","labels_url":"https://api.github.com/repos/wp-media/wp-rocket/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/wp-media/wp-rocket/issues/398/comments","events_url":"https://api.github.com/repos/wp-media/wp-rocket/issues/398/events","html_url":"https://github.com/wp-media/wp-rocket/issues/398","id":223920772,"number":398,"title":"CDN URL replacement issue with Template Toaster tags using img","user":{"login":"girlie","id":44367,"avatar_url":"https://avatars3.githubusercontent.com/u/44367?v=3","gravatar_id":"","url":"https://api.github.com/users/girlie","html_url":"https://github.com/girlie","followers_url":"https://api.github.com/users/girlie/followers","following_url":"https://api.github.com/users/girlie/following{/other_user}","gists_url":"https://api.github.com/users/girlie/gists{/gist_id}","starred_url":"https://api.github.com/users/girlie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girlie/subscriptions","organizations_url":"https://api.github.com/users/girlie/orgs","repos_url":"https://api.github.com/users/girlie/repos","events_url":"https://api.github.com/users/girlie/events{/privacy}","received_events_url":"https://api.github.com/users/girlie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-24T19:06:16Z","updated_at":"2017-04-24T19:06:16Z","closed_at":null,"body":"Best way to describe is with examples. :)\r\n\r\nHTML before CDN replacement:\r\n\r\n```\r\n<# if ( data.image ) { #>\r\n\t<img src=\"{{ data.thumb.src }}\" alt=\"\" />\r\n\t<# } #>\r\n```\r\n\r\nHTML after CDN replacement:\r\n\r\n```\r\n<# if ( data.image ) { #>\r\n\t<img  src=\"https://cdn.example.com/{{ data.thumb.src }}\" alt=\"\" />\r\n\t<# } #>\r\n```\r\n\r\nThe problem is that the value returned by `{{ data.thumb.src }}` is already a full URL, so it ends up being a value something like this:\r\n\r\n```\r\nhttps://cdn.example.com/https://example.com/image.jpg\r\n```\r\n\r\nwhich, of course, breaks the reference, causing the image to not display."}}
{"actor":{"display_login":"girlie"}}