figma-export icon indicating copy to clipboard operation
figma-export copied to clipboard

Add assets compression support (iOS)

Open NoFearJoe opened this issue 3 years ago • 5 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?

NoFearJoe avatar Mar 22 '21 13:03 NoFearJoe

Why do you want to change assets compression?

subdan avatar Mar 22 '21 13:03 subdan

This will help us to reduce their size

NoFearJoe avatar Mar 22 '21 14:03 NoFearJoe

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?

subdan avatar Mar 22 '21 14:03 subdan

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.

NoFearJoe avatar Mar 22 '21 14:03 NoFearJoe

Do you plan to add assets compression support?

No, because most developers use default compression type.

Which one is better?

The first one.

subdan avatar Mar 22 '21 16:03 subdan