fresco
An Android library for managing images and the memory they use.
Meta's Android library for loading and displaying images. Handles memory, two-level caching, progressive JPEGs, animated GIFs, and WebP without app-level plumbing.
Fresco is an Android library from Meta (Facebook) for loading and displaying images in mobile apps. The problem it solves is that handling images in Android is surprisingly complex: you have to fetch them from the internet or local storage, manage memory carefully (images can be large and cause apps to crash with out-of-memory errors), show a placeholder while the real image loads, and handle animated formats. Fresco takes care of all of this for you so you do not have to write the plumbing yourself.
It uses a two-level caching system: one cache kept in RAM (fast, but limited) and a second cache stored on the device's internal storage (slower, but persists between sessions). On older versions of Android, Fresco goes further by storing image data in a special region of memory outside the main Java heap, which reduces the risk of out-of-memory crashes that plagued image-heavy apps on older devices.
Beyond the basics, Fresco supports streaming of progressive JPEGs (where the image appears blurry and sharpens as more data arrives), animated GIFs, and WebP images (a modern image format). It provides extensive customization hooks for how images load and display. You add it to an Android project by including one line in the Gradle build file (the standard build tool for Android). The library is written in Java and is MIT-licensed.
Where it fits
- Display network images in an Android feed without writing cache code
- Render animated GIFs and WebP images in a chat app
- Stream progressive JPEGs so users see a preview before the full image arrives
- Reduce out-of-memory crashes on older Android devices with image-heavy screens