Skip to content

Reduce APK Size by Optimizing Drawable Resources #6761

@mcliquid

Description

@mcliquid

Problem / Observation

The current APK size in v63.0 is 102.4 MB.
According to Android Studio's APK Analyzer, resources account for 47.4% of the total size, making them the largest contributor.

Image

For example:

  • There are currently 308 drawable-xxhdpi images
  • These alone sum up to roughly 14 MB

Initial tests using tools like Squoosh show that many of the larger JPG files can be reduced by ~50% or more without noticeable quality loss.

Image

Proposed Idea

Run a batch optimization pass over drawable resources using the Squoosh CLI locally I hope this would likely cut multiple megabytes from the APK size with minimal runtime impact.

But before investing time into setting up a reproducible optimization workflow:
Is resource optimization of drawable assets desired for StreetComplete?

Specifically:

  • Is size reduction a current priority?
  • Are there concerns regarding image quality, maintenance, or reproducibility?
  • Would such changes be welcome in a PR?

If the general direction is approved, I would prepare a small proof-of-concept PR with the optimized images for evaluation. Same later for SCEE of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions