June Rockwell

How to add Icon & Splash to Ionic manually

The Ionic CLI has the capability to generate different sizes for your app icon and splash image by just using one image source for each. Right now it’s still in beta version 1.3.1. though. When I tried it a few times, it didn’t work for me while it worked for others. This is the error I got from the terminal:

So I decided that I wanted to see if I could add them manually just in case the generator didn’t work again in the future. This is how to add icon & splash to ionic manually:

After hours of research, these are what Ionic’s Image generator should add to config.xml. So yeah, we’re basically trying to produce the outcomes that Ionic’s image generator produces. Notice that each of the images have unique names. That’s one of the inconveniences when you have to resize images for each platform. Here, we’re telling Ionic that there are these assets to be rendered as app icons and splash images. Though, they don’t physically exist in the project yet.

2. Create the resources folder

Create this folder at the root of your Ionic project.

3. Add folders ios and android inside resources

Make sure that they are all lowercase.

4. Create folders icon and splash inside ios and android

These should also be lowercase. We’re going to save all the icons inside the icon folders and the splash images in the splash folders.

5. I first designed the app icon in Illustrator

Based on Ionic’s Image generator instructions, the least amount of size to use for the app icon is 192px x 192px. From this size, we can manually create different sized icons for different iOS and Android screen resolutions. I opened Ionic’s app icon template in Illustrator (originally a Photoshop file but I like vectors).

Note: You can download the Illustrator file and delete my placeholder icon, or just add your own layers on top of the existing layers and then just hide those layers. Afterwards, show the bottom most layer, which contains the borders from the original Ionic template. Remember to hide the borders when you’re ready to Save for Web…

So since the app icon will always be a square, just go to File > Save for Web… and resize for iOS and Android requirements. Refer to the config.xml for the sizes and the corresponding file names.

This part’s a little easier. But I found the splash images to be tedious because of the varying file names and sizes. Since I had to copy and paste the artwork from one splash image to another, sometimes I had to thin out some lines or make them thicker. I also had to make some text bigger to be legible or smaller for contrast, etc. But modifications depends on your preferences.

6. Working on the Splash Image

Android

For this part, I started with Android’s land-ldpi density. I copied and pasted my placeholder app icon and added some text at the bottom. Then, I made sure that it was centered inside the artboard.

Then I did the same to all the other densities all the way to port-xxxhdpi. So I saved the Illustrator files for each density and named the Illustrator file according to its corresponding .png filename. This way, you can just save for the web and not have to resize each and every single one of them and try get the.png filenames right too.

iOS

I made a few more Illustrator files and named them according to the required splash image file names. I did the same thing I did for the Android splash images.

My thoughts on the image generator

It’s very convenient that the Ionic creators thought of this. Having just one source for the app icon and one source for the splash image and the CLI takes care of the resizing. You don’t even have to save the source as a .png. You can just drop the .psd (Photoshop) or .ai (Illustrator) in the resources folder of your Ionic project. This is very convenient because you don’t want to spend so much time resizing all your images for iOS and Android over and over again. It’s a whole day’s job if you’ve done it so many times before, if not more than a day. The reason why I said “over and over again” is because there are times when you need to run your app to check if the image looks presentable. For example, if you need to make sure the elements are centered or aligned correctly. It’s tedious. There are basically at least 16 sizes for icons and at least 10 splash image sizes for iOS. For Android, it’s about 6 icon sizes and 12 splash images. That’s a lot. How about if Ionic can run on FirefoxOS or Amazon Fire one day and your boss (or client) will want you to make executable binaries for those too? That’s more work. But like I said at the beginning, this part of Ionic CLI is still in beta.

I was a little frustrated but I looked on the forum to get some answers, and other people were having the same problem. But unlike me, some people were able to generate icons and splash images, though the next time they tried it, the generator just stopped working somehow with no explanation from the creators. Well, there’s no explanation yet anyways, but I believe in what Ionic can do and I know the creators can fix this. Plus, we can add the icons and splash images manually. My suggestion is to use your ready made .psd or .ai templates with the corresponding file names and sizes. That way, you can just change the artwork (or whatever else), then just Save for Web.. and drop them to their rightful directories.

For more information:

I hope this tutorial and/or my .ai templates can help just in case the Ionic icon and splash image generator acts up again. But just because one part isn’t working doesn’t mean we stop and give up. We have to find a work-around it. Come on, we can’t just rely on computers to do things for us all the time.

Subscribe via Email

Subscribe to RSS Feed

Common Topics

About Me

Hi, I'm June Rockwell. I design & develop websites & mobile apps, preferably for modern browsers, iOS & Android. Since 2010, I've used the LAMP stack with jQuery. But my current favorite is the MEAN stack. Starting 2012, I've made apps using Native iOS & Android SDK's. But as of 2013 I've been
using cross-platform tools such as Titanium SDK & Ionic Framework. I hope that my blog can help anybody out there!