{"id":270,"date":"2015-01-05T02:00:00","date_gmt":"2015-01-05T02:00:00","guid":{"rendered":"http:\/\/localhost\/?p=270"},"modified":"2019-07-13T13:50:49","modified_gmt":"2019-07-13T13:50:49","slug":"automating-icons-and-splash-screens","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens","title":{"rendered":"Automating Icons and Splash Screens"},"content":{"rendered":"<blockquote><p>\n  Note: Updated July 13th, 2019 based on Ionic CLI <a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/blob\/master\/packages\/ionic\/CHANGELOG.md\">version 5.0.0+<\/a>\n<\/p><\/blockquote>\n<p>What\u2019s the first thing users see when they download your app? What about after they install it and start the app?<\/p>\n<p>An app icon and splash screen (launch image) are important parts of any app, yet making them used to be incredibly tedious. You needed numerous icons for iOS and Android, and then you had to deal with splash screens and all their different sizes. To save you the stress of dealing with all that, we\u2019ve made it possible for you to generate app icons and splash screens via the Ionic CLI.<\/p>\n<p><!--more--><\/p>\n<h3>Generate those Resources<\/h3>\n<p>With the new CLI, all you need is a resource directory and two images. These images must be <code>.png<\/code> files named icon.png and splash.png. With the images in a resources directory, <code>.\/resources<\/code>, the <code>ionic cordova resources<\/code> command will generate the icons and splash screen images locally for each platform setup in the project by using the <a href=\"https:\/\/github.com\/ionic-team\/cordova-res\"><code>cordova-res<\/code> tool<\/a>.<\/p>\n<pre><code class=\"language-bash\">$ npm install -g cordova-res\n$ ionic cordova resources\n<\/code><\/pre>\n<p>After the images are generated, the CLI will update the <code>config.xml<\/code> to <a href=\"https:\/\/cordova.apache.org\/docs\/en\/latest\/config_ref\/images.html\">include the icons and splash screens<\/a>, so they will be transferred over in Cordova&#8217;s build process. NOTE: This process requires Cordova CLI version 3.6 or higher.<\/p>\n<p>If you only need to update one of the resources, or you only want to generate icons and not both, the <code>ionic cordova resources<\/code> command has two flags that allow you to target each asset, instead of generating both.<\/p>\n<pre><code class=\"language-bash\">$ ionic cordova resources --icon\n$ ionic cordova resources --splash\n<\/code><\/pre>\n<h3>Image Sizes<\/h3>\n<p>In order to be able to crop and resize images to fit the various needs of each platform, icons and splash screen images should meet a minimum size requirement.<\/p>\n<p>The icon image&#8217;s minimum dimensions should be 1024&#215;1024 pixels and should have no rounded corners. Note that each platform will apply its own mask and effects to the icons. For example, iOS will automatically apply its custom rounded corners, so the source file should not already come with rounded corners.<\/p>\n<p>Splash screen dimensions vary for each platform, device, and orientation, so a square source image is required to generate each of the various screen sizes. The source image&#8217;s minimum dimensions should be 2732&#215;2732 pixels, and the artwork should be centered within the square, because each generated image will be center cropped into landscape and portrait images.<\/p>\n<p>The splash screen&#8217;s artwork should roughly fit within a center square (1200&#215;1200 pixels). <a href=\"http:\/\/code.ionicframework.com\/resources\/splash.psd\">This template<\/a> provides the recommended size and guidelines about the artwork&#8217;s safe zone.<\/p>\n<h3>Platform Specifics<\/h3>\n<p>Want different icons for the iOS and Android versions of your app? No problem; we\u2019ve got that covered, too. To use different source images for individual platforms, place the source image in the respective platform&#8217;s directory. To use a different icon for Android, the image should follow this path: <code>resources\/android\/icon.png<\/code>, and the image for iOS should use this path: <code>resources\/ios\/icon.png<\/code>. This way, you can have an iOS icon with native rounded corners and an Android icon with a transparent background.<\/p>\n<p>This is just one more way Ionic aims to make developers\u2019 lives easier, not to mention more fun. Update your CLI and install <code>cordova-res<\/code>, then try out the resource generator today.<\/p>\n<pre><code class=\"language-bash\">$ npm install -g ionic cordova-res\n<\/code><\/pre>\n<h3>What&#8217;s Next<\/h3>\n<p>As we mentioned in our Beta 14 blog post, we&#8217;ve been working on adding Crosswalk integration for Android into our CLI. Josh has been hard at work on this, and it will be landing in the CLI as a beta feature soon. Keep an eye on the CLI!<\/p>\n<ul>\n<li><a href=\"https:\/\/ionicframework.com\/docs\/cli\/commands\/cordova-resources\">Ionic CLI Resource Generator Docs<\/a><\/li>\n<li><a href=\"https:\/\/cordova.apache.org\/docs\/en\/latest\/config_ref\/images.html\">Cordova Icons and Splash Screens Docs<\/a><\/li>\n<li><a href=\"http:\/\/code.ionicframework.com\/resources\/splash.psd\">Splash screen photoshop template<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Note: Updated July 13th, 2019 based on Ionic CLI version 5.0.0+ What\u2019s the first thing users see when they download your app? What about after they install it and start the app? An app icon and splash screen (launch image) are important parts of any app, yet making them used to be incredibly tedious. You [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1638,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"","publish_post_category":"","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[121],"tags":[29,3,4],"class_list":["post-270","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-cli","tag-ionic","tag-top-posts"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automating Icons and Splash Screens - Ionic Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automating Icons and Splash Screens\" \/>\n<meta property=\"og:description\" content=\"Note: Updated July 13th, 2019 based on Ionic CLI version 5.0.0+ What\u2019s the first thing users see when they download your app? What about after they install it and start the app? An app icon and splash screen (launch image) are important parts of any app, yet making them used to be incredibly tedious. You [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-05T02:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-13T13:50:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mike Hartington\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mhartington\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Hartington\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\"},\"author\":{\"name\":\"Mike Hartington\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\"},\"headline\":\"Automating Icons and Splash Screens\",\"datePublished\":\"2015-01-05T02:00:00+00:00\",\"dateModified\":\"2019-07-13T13:50:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\"},\"wordCount\":583,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg\",\"keywords\":[\"CLI\",\"Ionic\",\"Top Posts\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\",\"url\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\",\"name\":\"Automating Icons and Splash Screens - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg\",\"datePublished\":\"2015-01-05T02:00:00+00:00\",\"dateModified\":\"2019-07-13T13:50:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg\",\"width\":1400,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automating Icons and Splash Screens\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\",\"name\":\"Mike Hartington\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"caption\":\"Mike Hartington\"},\"description\":\"Director of Developer Relations\",\"sameAs\":[\"https:\/\/twitter.com\/mhartington\",\"https:\/\/x.com\/mhartington\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/mike\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Automating Icons and Splash Screens - Ionic Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens","og_locale":"en_US","og_type":"article","og_title":"Automating Icons and Splash Screens","og_description":"Note: Updated July 13th, 2019 based on Ionic CLI version 5.0.0+ What\u2019s the first thing users see when they download your app? What about after they install it and start the app? An app icon and splash screen (launch image) are important parts of any app, yet making them used to be incredibly tedious. You [&hellip;]","og_url":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens","og_site_name":"Ionic Blog","article_published_time":"2015-01-05T02:00:00+00:00","article_modified_time":"2019-07-13T13:50:49+00:00","og_image":[{"width":1400,"height":680,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","type":"image\/jpeg"}],"author":"Mike Hartington","twitter_card":"summary_large_image","twitter_creator":"@mhartington","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Mike Hartington","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens"},"author":{"name":"Mike Hartington","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b"},"headline":"Automating Icons and Splash Screens","datePublished":"2015-01-05T02:00:00+00:00","dateModified":"2019-07-13T13:50:49+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens"},"wordCount":583,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","keywords":["CLI","Ionic","Top Posts"],"articleSection":["Engineering"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens","url":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens","name":"Automating Icons and Splash Screens - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","datePublished":"2015-01-05T02:00:00+00:00","dateModified":"2019-07-13T13:50:49+00:00","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","width":1400,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/automating-icons-and-splash-screens#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Automating Icons and Splash Screens"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b","name":"Mike Hartington","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","caption":"Mike Hartington"},"description":"Director of Developer Relations","sameAs":["https:\/\/twitter.com\/mhartington","https:\/\/x.com\/mhartington"],"url":"https:\/\/ionic.io\/blog\/author\/mike"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2015\/01\/splash-header.jpg","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=270"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/270\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/1638"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}