Icon Cache | AppStream | AppStream 0.12
Description: 3.3.1 Introduction # In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desk…

Jump to content Jump to page navigation: previous page [access key p]/next page [access key n]
AppStream
AppStream › Collection Metadata › Icon Cache
AppStream › Collection Metadata › Icon Cache
Top
←→

## 3.3 Icon Cache #

### 3.3.1 Introduction #

In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desktop file. Their size should be 64x64px, it is okay to just provide one size.

### 3.3.2 Filesystem locations #

All icons of type `cached` must be placed in `/usr/share/app-info/icons/%{origin}/%{size}/` or `/var/cache/app-info/icons/%{origin}/%{size}/`, where `origin` is the AppStream data origin defined in the AppStream data file (see Section 3.1.3, “General XML structure”), and `size` is `64x64` or `128x128` depending on the size of the icon. And icon might be present with different sizes in both directories.

For example the cache icon `krita.png` of a component in a data file with the origin `jessie` should be stored in `/usr/share/app-info/icons/jessie/64x64/krita.png` (or in the `/var/cache` location).

Icon sclaing factors commonly used for HiDPI display support are part of the size-directory filename and are separated from the regular size via an `@` sign. If the scaling factor is 1, it must be omitted from the directory name. For example, if the icon scaling factor is `2` for icons of size `64x64` from origin `jessie`, the icon must be placed in `/usr/share/app-info/icons/jessie/64x64@2/`.

###### Note: Legacy Support

In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming that the icons placed there are of size `64x64` pixels.