RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add assets compression support (iOS)

NoFearJoe opened this issue · comments

Do you plan to add assets compression support?

If no, I can do it. But there are 3 ways of implementation:

  • Add an optional property compression for icons and images in the config file and then generate Contents.json with this property in the root directory of images or illustrations (now it's called XcodeEmptyContents).
  • Add an optional property compression for icons and images in the config file and then generate Contents.json with this property for each asset.
  • Configure compression in Figma.

Which one is better?

Why do you want to change assets compression?

This will help us to reduce their size

I exported large 40 illustrations and changing compression type doesn’t reduce Asset.car file size.

Compression type Asset.car size
GPU Smallest Size 4,2 MB
GPU Best Quality 9,3 MB
Basic 13,2 MB
Lossless 2,5 MB
Automatic (Default) 2,5 MB

Could you show me an example project where setting asset compression type reduces Asset.car file size?

It's strange because I get opposite results. I can't share my assets, but can remember my results:

  • Automatic: 190Mb
  • GPU Best Quality: 117Mb
  • GPU Smallest Size: 48Mb

I have different asset formats – pdf and png.

Do you plan to add assets compression support?

No, because most developers use default compression type.

Which one is better?

The first one.