figma-asset-extractor
v1.0.4
Published
Command line tool to extract image assets from a .fig file
Downloads
14
Maintainers
Readme
Figma Asset Extractor
This is a command line tool (not a figma plugin) that is perfect for developers to easily extract all image assets from a .fig file locally. This outputs all assets individually in their original form, not as combined layers or groups.
Features
- Extracts all image assets from your Figma file in one step
- Lets you optionally choose your output folder (default: filename without .fig extension)
- Can optionally convert images to WebP or AVIF for smaller file sizes
- Optionally set max dimensions of images as you extract them
- Simple, fast, and works with a single command
Install
npm install -g figma-asset-extractorUsage
figma-asset-extractor my-design.figOptions
--out <directory>: Choose a different output folder--webpor--avif: Convert images to WebP or AVIF--quality <1-100>: Set quality for WebP/AVIF (default: 80)--max-width <px>/--max-height <px>: Resize images--quiet: Suppress output
Advanced Usage
Choose a different output folder
figma-asset-extractor my-design.fig --out ./assetsExtract images as WebP
figma-asset-extractor my-design.fig --webpExtract images as Avif
figma-asset-extractor my-design.fig --avifIf using --webp or --avif, change quality (default: 80)
figma-asset-extractor my-design.fig --webp --quality 90Constrain image size as you extract
figma-asset-extractor my-design.fig --max-width 800 --max-height 600Everything example
figma-asset-extractor design.fig --out ./assets --webp --quality 90 --max-width 1200Requirements
- Node.js 14+
- A Figma
.figfile
For issues or suggestions, visit the GitHub repo.
