One of the issues I’ve always had with mobile development is needing to scale images to support the multiple icon sizes and splash screen sizes. While customized icons and splash screens for each device is a valuable asset for any application, I’ve always viewed it as this tiring and monotonous task that needs to get done for mobile development.
Enter the ionic resources command. Now that I’ve been doing more mobile development with the Ionic framework and Cordova, I realized that they’ve got a plethora of tools to make mobile development easier.
In an Ionic project there is a “resources” folder that contains icon.png and splash.png along with android and ios folders. If you run ionic resources from the command line within the Ionic project, it will automatically take the icon.png and splash.png and scale them or crop them to fit the appropriate sizes.
If you just want to regenerate the icons or splash pages only, use these commands:
ionic resources --icon
ionic resources --splash
For more info check out the Ionic Blog post: http://blog.ionic.io/automating-icons-and-splash-screens/