--- license: > Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. title: Customize app icons toc_title: Customize icons description: Learn how to customize icons for your Cordova application. --- # Customize Icons This section shows how to configure an application's icon for various platforms. Documentation about splash screen images can be found in the Cordova-Plugin-Splashscreen documentation [Splashscreen plugin docs][splashscreen_plugin]. ## Configuring Icons in the CLI When working in the CLI you can define application icon(s) via the `` element (`config.xml`). If you do not specify an icon, the Apache Cordova logo is used. ```xml ``` Attributes | Description --------------|-------------------------------------------------------------------------------- src | *Required*
Location of the image file, relative to your project directory platform | *Optional*
Target platform width | *Optional*
Icon width in pixels height | *Optional*
Icon height in pixels density | *Optional*
==Android==
Specified icon density target | *Optional*
==Windows==
Destination filename for the image file and all its' MRT companions The following configuration can be used to define a single default icon which will be used for all platforms. ```xml ``` For each platform, you can also define a pixel-perfect icon set to fit different screen resolutions. ##Android ```xml ``` ###See Also - [Android icon guide](https://www.google.com/design/spec/style/icons.html) - [Android - Supporting multiple screens](http://developer.android.com/guide/practices/screens_support.html) ##BlackBerry10 ```xml ``` ###See Also - [BlackBerry's documentation][blackberry_icon] for targeting multiple sizes and locales. ##Browser Icons are not applicable to the Browser platform. ##iOS ```xml ``` ###See Also - [App Icons on iPad and iPhone](https://developer.apple.com/library/content/qa/qa1686/_index.html) ##Windows For Windows the recommended approach to define application icons is to use the `target` attribute. ```xml ``` where `src` is the path to the icon which needs to be added. The Windows platform handles MRT icons automatically, so if you specify `src="res/windows/storelogo.png"` the following files will be copied into the application's `images` folder: `res/windows/storelogo.scale-100.png`, `res/windows/storelogo.scale-200.png`, etc. TODO Define what MRT is. The `target` attribute specifies the base name for the resultant icons. For every icon file, its destination filename is calculated as `target + '.' + MRT_qualifiers + extension(src)`. For the icons to display properly in the application, every `target` value should be one of the icon filenames defined in the application's `.appxmanifest` file. Summarizing the above... using the `target` attribute it is possible to: * define a group of icons for different device scale factors using a single `` element, for example: ```xml ``` which is equivalent to the following lines: ```xml ``` * define icons with scale factors other than `scale-100` and `scale-240` (and any other MRT qualifiers) Although it is not recommended, it is also possible to define icons using the `width` and `height` attributes: ```xml ``` ###See Also: - [Windows 10 platform guidelines for icons](https://msdn.microsoft.com/en-us/library/windows/apps/mt412102.aspx). - [Windows 8.1 tiles and icons sizes](https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh781198.aspx) ##Windows Phone 8 (WP8 Platform) ```xml ``` [blackberry_icon]: http://developer.blackberry.com/html5/documentation/icon_element.html [splashscreen_plugin]: ../reference/cordova-plugin-splashscreen/