Toolvito

Works on this device

Flutter Icon Size Generator

Enter the size of an icon or image on screen in logical pixels to get the pixel size and folder of each resolution variant (1.0x, 2.0x, 3.0x), the pubspec.yaml lines and the Image.asset code. Or choose a platform to see the sizes of its app icon. No image is made or uploaded.

Enter your values

The pixel size and folder of each resolution variant of an image or icon asset, with the pubspec.yaml lines and the Image.asset code.

Your values

The size of the image on screen in logical pixels, such as 24 for an icon. Flutter gives widths and heights in logical pixels.

The path you write in pubspec.yaml and in Image.asset, such as assets/images/icon.png.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Make the list.

How to use the icon size generator

  1. For an image or icon inside your app, choose Image asset variants and enter its size on screen, such as 24 × 24, and its asset path, such as assets/images/icon.png.
  2. Export each size from your design tool into the folders in the table, and copy the pubspec.yaml lines and the code.
  3. For the icon of the app itself, choose Launcher and app icon sizes and the platform.

How Flutter picks an image variant

  • Put the 1.0x image at its path, such as assets/images/icon.png, and the other variants in folders named after their scale beside it: assets/images/2.0x/icon.png, assets/images/3.0x/icon.png.
  • List the main asset in pubspec.yaml. Flutter finds the variants and picks the one closest to the device pixel ratio of the screen.
  • Pixels = logical pixels × scale: a 24-pixel icon is 48 px in 2.0x and 72 px in 3.0x. A size that is not a whole number of pixels is rounded half up and marked.
  • Give the image its width and height in logical pixels in code, so that it has the same size on every screen.

App icon sizes

These lists come from the Android and Apple guides and from the files of a new Flutter project. Each icon is square.

App icon sizes by platform
Icon set Use Size (px)
Android launcher icon (48 dp, mipmap folders) mdpi (1x) 48
Android launcher icon (48 dp, mipmap folders) hdpi (1.5x) 72
Android launcher icon (48 dp, mipmap folders) xhdpi (2x) 96
Android launcher icon (48 dp, mipmap folders) xxhdpi (3x) 144
Android launcher icon (48 dp, mipmap folders) xxxhdpi (4x) 192
Android launcher icon (48 dp, mipmap folders) Google Play store listing 512
Android adaptive icon layers (108 dp) mdpi (1x) 108
Android adaptive icon layers (108 dp) hdpi (1.5x) 162
Android adaptive icon layers (108 dp) xhdpi (2x) 216
Android adaptive icon layers (108 dp) xxhdpi (3x) 324
Android adaptive icon layers (108 dp) xxxhdpi (4x) 432
iOS app icon set (points × scale) iPhone notification 20 pt @2x 40
iOS app icon set (points × scale) iPhone notification 20 pt @3x 60
iOS app icon set (points × scale) iPhone settings 29 pt @2x 58
iOS app icon set (points × scale) iPhone settings 29 pt @3x 87
iOS app icon set (points × scale) iPhone Spotlight 40 pt @2x 80
iOS app icon set (points × scale) iPhone Spotlight 40 pt @3x 120
iOS app icon set (points × scale) iPhone app 60 pt @2x 120
iOS app icon set (points × scale) iPhone app 60 pt @3x 180
iOS app icon set (points × scale) iPad notification 20 pt @1x 20
iOS app icon set (points × scale) iPad settings 29 pt @1x 29
iOS app icon set (points × scale) iPad Spotlight 40 pt @1x 40
iOS app icon set (points × scale) iPad app 76 pt @1x 76
iOS app icon set (points × scale) iPad app 76 pt @2x 152
iOS app icon set (points × scale) iPad Pro app 83.5 pt @2x 167
iOS app icon set (points × scale) App Store 1024 pt @1x 1024
Web app icons (manifest) Icon 192
Web app icons (manifest) Icon 512
Web app icons (manifest) Maskable icon 192
Web app icons (manifest) Maskable icon 512
macOS app icon set App icon 16
macOS app icon set App icon 32
macOS app icon set App icon 64
macOS app icon set App icon 128
macOS app icon set App icon 256
macOS app icon set App icon 512
macOS app icon set App icon 1024

Worked example

An icon of 24 × 24 logical pixels at assets/images/icon.png: icon.png is 24 × 24 px, 2.0x/icon.png is 48 × 48 px and 3.0x/icon.png is 72 × 72 px. pubspec.yaml lists assets/images/icon.png and the code is Image.asset('assets/images/icon.png', width: 24, height: 24).

The Android launcher icon is 48 dp, so it is 48, 72, 96, 144 and 192 px in the mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi folders. The iPhone app icon of 60 pt is 120 px at @2x and 180 px at @3x.

Limits you should know

  • The tool gives sizes, folders and code. It does not make, resize or compress images.
  • Platforms change their icon lists. Check the current Android and Apple guides before you publish. Newer Xcode versions can make every iOS size from one 1024 × 1024 image.
  • Icons drawn by the Icon widget from an icon font (such as Material icons) need no variants: they are drawn at any size.
  • For React Native file names (@2x, @3x), use the React Native Image Density Generator.

Related tools