Image Generation
iOS and Android handles images differently. iOS use 1x..3x format and Android uses xxhdpi, hdpi format and so on. To overcome those quirks and seamlessly handle image handling for both OS, Smartface has auto image generation feature embedded in the Smartface IDE.
- Create automated folder on
/images
**** directory if it doesn't exist Upload your highest resolution image to/images/automated
folder. It will compress and resize the image accordingly. - Right click on the image
- Select Generate auto-resized images
- Images for different resolutions for both platforms will be generated.
You can use generated images on your project, like images://yourimage.png
. For further information about how to use images, refer the document below:
Supported Image Types
Only .png images are supported.
Special characters in image name are not supported
You cant use !@#$%^&*()_+-=[]{}|;':",./<>?
in the image name.
Image name case sensitivity
Except for AppIcon and LaunchImage, all image names should be in lowercase.

Alternate generate method
You can also use the package sfImageProcessor to accomplish image generation. This package is installed by default on the boilerplate.
info
Multiple image selection is not supported at the moment. For bulk image generation, you can use the script mentioned below or generate them one by one.
Generating Launch Image
- Name of launch image must be either
- LaunchImage.png
- LaunchImage.ios.png
- LaunchImage.android.png
- If LaunchImage.png is being used, then launch images for both platforms are generated
- When the LaunchImage.ios.png or LaunchImage.android.png is being used then launch images for that specific platform are generated
caution
LaunchImage.ios.png
LaunchImage.android.png
Is valid for CLI but not for IDE.
Use square sized launch image
Developers must edit original launch image to make it square sized so that our image processor module can perform resizing & cropping accordingly
info
The name of Launch Image is splash_image
on Android.
So you if you want to change your splash image only on Android, you need to find the image with name splash_image
from images/Android
and replace it with your new image.
For Launch image, to handle different screen sizes better on Android, the developer should create a 9-patch image. The steps are explained below.
App Icons and Splash ImagesOriginal Sized Image
Square Sized Image
caution
It is recommended for your launch image to have at least 2208x2208 resolution
Generating App Icon
Exact same rules apply for generating application icons
Name of the app icon must be either
- AppIcon.png
- AppIcon.ios.png
- AppIcon.android.png
caution
AppIcon.ios.png
AppIcon.android.png
Can be generated manually from sfImageProcessor tool but you cannot use Smartface IDE to generate them.
caution
It is recommended for your app icon to have 1024x1024 resolution