Bird
Raised Fist0
Figmabi_tool~10 mins

Asset export (PNG, SVG, PDF) in Figma - Interactive Code Practice

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to export a frame as a PNG file.

Figma
figma.exportAsync(node, { format: '[1]' })
Drag options to blanks, or click blank then click option'
ASVG
BJPG
CPDF
DPNG
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'SVG' instead of 'PNG' for raster export.
Using 'PDF' which is vector-based, not PNG.
2fill in blank
medium

Complete the code to export a selection as an SVG file.

Figma
figma.exportAsync(selection, { format: '[1]' })
Drag options to blanks, or click blank then click option'
ASVG
BPNG
CPDF
DJPG
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'PNG' which is raster, not vector.
Using 'JPG' which does not support transparency.
3fill in blank
hard

Fix the error in the export code to generate a PDF file.

Figma
figma.exportAsync(node, { format: '[1]' })
Drag options to blanks, or click blank then click option'
APNG
BSVG
CPDF
Dbmp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bmp' which is not supported for export.
Using 'SVG' when PDF is required.
4fill in blank
hard

Fill both blanks to export a node as a PNG with 2x scale.

Figma
figma.exportAsync(node, { format: '[1]', [2]: 2 })
Drag options to blanks, or click blank then click option'
APNG
Bscale
Cquality
Dcompression
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping 'format' and 'scale' keys.
Using 'quality' which is for JPEG exports.
5fill in blank
hard

Fill all three blanks to export a selection as a PDF with 300 DPI and no compression.

Figma
figma.exportAsync(selection, { format: '[1]', [2]: 300, [3]: false })
Drag options to blanks, or click blank then click option'
Adpi
BPDF
Ccompress
DPNG
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'PNG' instead of 'PDF' for format.
Setting compress to true when no compression is needed.

Practice

(1/5)
1. Which export format in Figma is best suited for sharing scalable vector graphics without losing quality?
easy
A. PNG
B. JPEG
C. PDF
D. SVG

Solution

  1. Step 1: Understand vector vs raster formats

    SVG is a vector format that scales without losing quality, unlike PNG or JPEG which are raster images.
  2. Step 2: Match format to use case

    For scalable graphics, SVG is ideal because it preserves sharpness at any size.
  3. Final Answer:

    SVG -> Option D
  4. Quick Check:

    Vector graphics = SVG [OK]
Hint: Choose SVG for sharp, scalable images [OK]
Common Mistakes:
  • Confusing PNG as scalable
  • Choosing PDF for images
  • Selecting JPEG for vectors
2. Which of the following is the correct way to export a frame as a PNG in Figma?
easy
A. Drag frame to desktop > Save as PNG
B. Select frame > File > Save As > PNG
C. Right-click frame > Export > Choose PNG > Click Export
D. Select frame > Edit > Export as SVG

Solution

  1. Step 1: Locate export option in Figma

    Right-clicking the frame and selecting Export is the standard way to export assets.
  2. Step 2: Choose correct format and export

    After choosing PNG format, clicking Export saves the file correctly.
  3. Final Answer:

    Right-click frame > Export > Choose PNG > Click Export -> Option C
  4. Quick Check:

    Export via right-click > PNG [OK]
Hint: Right-click frame to export quickly [OK]
Common Mistakes:
  • Using Save As instead of Export
  • Dragging frame to desktop
  • Choosing wrong export format
3. What will be the result if you export a vector icon as a PNG at 2x scale in Figma?
medium
A. A vector file that can be scaled infinitely
B. A raster image twice the size of the original icon
C. A PDF document with embedded vectors
D. An SVG file with double the resolution

Solution

  1. Step 1: Understand PNG export behavior

    PNG exports a raster image, so scaling to 2x increases pixel dimensions, not vector quality.
  2. Step 2: Confirm output type

    The output is a raster image twice as large in pixels, not a vector or PDF.
  3. Final Answer:

    A raster image twice the size of the original icon -> Option B
  4. Quick Check:

    PNG at 2x = bigger raster image [OK]
Hint: PNG scales pixels, not vectors [OK]
Common Mistakes:
  • Expecting vector output from PNG
  • Confusing SVG with PNG
  • Thinking PDF is created
4. You tried exporting a frame as a PDF but the file is blank. What is the most likely cause?
medium
A. The export scale was set to 0
B. You exported the frame without selecting it first
C. You chose SVG format instead of PDF
D. The frame contains only raster images without vector layers

Solution

  1. Step 1: Check export scale settings

    If the scale is set to 0, the exported file will have no visible content.
  2. Step 2: Understand impact on PDF export

    PDF export respects scale; zero scale means blank output.
  3. Final Answer:

    The export scale was set to 0 -> Option A
  4. Quick Check:

    Zero scale = blank export [OK]
Hint: Ensure export scale is above zero [OK]
Common Mistakes:
  • Not selecting frame before export
  • Confusing SVG with PDF
  • Assuming raster images cause blank PDF
5. You need to export a multi-page design as a single PDF document in Figma. Which approach should you take?
hard
A. Select all frames and export as PDF in one action
B. Export each frame as PNG and combine externally into a PDF
C. Export frames individually as SVG and merge in Figma
D. Use the 'Export selection' option to export all frames as separate PDFs

Solution

  1. Step 1: Select all frames to export

    In Figma, selecting multiple frames allows exporting them together.
  2. Step 2: Export as PDF in one action

    Choosing PDF format for multiple selected frames creates a single multi-page PDF.
  3. Final Answer:

    Select all frames and export as PDF in one action -> Option A
  4. Quick Check:

    Multi-frame PDF export = select all + export PDF [OK]
Hint: Select all frames, export PDF once [OK]
Common Mistakes:
  • Exporting PNGs then merging
  • Exporting SVGs expecting PDF
  • Exporting frames separately as PDFs