{"_id":"55e99381358d923700be988e","user":"542979b61215fe08007e0ee4","category":{"_id":"542979c51215fe08007e0ee9","project":"542979c51215fe08007e0ee5","version":"542979c51215fe08007e0ee8","__v":12,"pages":["542979c51215fe08007e0eeb","542ae00fcedcfc140004b81e","542abdb354d88d140075fbf2","542986467a6b690800767fb1","54298c241215fe08007e0ff4","54380adef1c23914006724b9","546287c18ba5620800710e4c","55e99381358d923700be988e","56328926df556c0d00cd0929","56421475b0dc090d00f8842c"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T15:24:53.471Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"parentDoc":null,"version":{"_id":"542979c51215fe08007e0ee8","project":"542979c51215fe08007e0ee5","__v":4,"createdAt":"2014-09-29T15:24:53.437Z","releaseDate":"2014-09-29T15:24:53.437Z","categories":["542979c51215fe08007e0ee9","542985897a6b690800767fab","5429898d1215fe08007e0fe6","542ac5aa54d88d140075fcaf"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":3,"githubsync":"","project":"542979c51215fe08007e0ee5","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-04T12:50:09.949Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Before sending [Email Previews](doc:email-previews) or starting a [Compatibility Test](doc:compatibility-testing) the images in your email need to be uploaded somewhere publicly accessible.  Inkcite will automatically upload any new or updated images (from your project's `images/` directory) to the CDN or other server.\n\n# Configuring Your CDN or Image Host\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Easy deployment of static assets to a public server or CDN.\\nsftp:\\n  host: 'cdn.hostname.com'\\n\\tpath: '/path/to/web/directory'\\n  username: '(YOUR SFTP USERNAME HERE)'\\n  password: '(YOUR SFTP PASSWORD HERE)'\",\n      \"language\": \"yaml\",\n      \"name\": \"config.yml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The path you specify must be both write-able by your user account and web-accessible so that recipients can load the images when they open your email.\",\n  \"title\": \"Note!\"\n}\n[/block]\nIf image optimization is configured, prior to uploading, Inkcite will pass new or updated images through ImageOptim.\n\nAs Inkcite is rendering the HTML for your email, it will automatically create fully-qualified URLs to the images in your email.  To do this, it relies on the `image-host` setting.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Preview-specific settings \\npreview:\\n  image-host: \\\"http://cdn.mycompany.com/emails/\\\"\",\n      \"language\": \"yaml\",\n      \"name\": \"config.yml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Example\",\n  \"body\": \"If your company's logo is saved to your project's `images/logo.jpg`, Inkcite would upload the file to `/path/to/web/directory/logo.jpg` and then reference that image in the email's HTML as `http://cdn.mycompany.com/emails/logo.jpg`\"\n}\n[/block]\nInkcite saves you time by only uploading new or updated images to your CDN or Image Host.  If you'd like to force Inkcite to re-upload all of the images associated with your email project, do so at the command line:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"inkcite upload --force\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"Automaticly sync optimized assets to your CDN or Image Host for previews and testing.","slug":"cdn-upload","type":"basic","title":"CDN Upload"}

CDN Upload

Automaticly sync optimized assets to your CDN or Image Host for previews and testing.

Before sending [Email Previews](doc:email-previews) or starting a [Compatibility Test](doc:compatibility-testing) the images in your email need to be uploaded somewhere publicly accessible. Inkcite will automatically upload any new or updated images (from your project's `images/` directory) to the CDN or other server. # Configuring Your CDN or Image Host [block:code] { "codes": [ { "code": "# Easy deployment of static assets to a public server or CDN.\nsftp:\n host: 'cdn.hostname.com'\n\tpath: '/path/to/web/directory'\n username: '(YOUR SFTP USERNAME HERE)'\n password: '(YOUR SFTP PASSWORD HERE)'", "language": "yaml", "name": "config.yml" } ] } [/block] [block:callout] { "type": "warning", "body": "The path you specify must be both write-able by your user account and web-accessible so that recipients can load the images when they open your email.", "title": "Note!" } [/block] If image optimization is configured, prior to uploading, Inkcite will pass new or updated images through ImageOptim. As Inkcite is rendering the HTML for your email, it will automatically create fully-qualified URLs to the images in your email. To do this, it relies on the `image-host` setting. [block:code] { "codes": [ { "code": "# Preview-specific settings \npreview:\n image-host: \"http://cdn.mycompany.com/emails/\"", "language": "yaml", "name": "config.yml" } ] } [/block] [block:callout] { "type": "info", "title": "Example", "body": "If your company's logo is saved to your project's `images/logo.jpg`, Inkcite would upload the file to `/path/to/web/directory/logo.jpg` and then reference that image in the email's HTML as `http://cdn.mycompany.com/emails/logo.jpg`" } [/block] Inkcite saves you time by only uploading new or updated images to your CDN or Image Host. If you'd like to force Inkcite to re-upload all of the images associated with your email project, do so at the command line: [block:code] { "codes": [ { "code": "inkcite upload --force", "language": "shell" } ] } [/block]