> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocket.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Image masking

> Apply image masks correctly in Figma for accurate rendering in Rocket.new's Figma-to-code pipeline.

export const LlmsDirective = () => <blockquote className="llms-directive">
    For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
    For a lightweight markdown version of this page, append .md to the URL.
  </blockquote>;

<LlmsDirective />

## What is image masking

When an image is masked with a layer, Figma creates a **mask object** in the layer hierarchy that includes both the mask shape and the layers being masked.

<Info>
  Incorrect masks cause broken layouts during import. Rocket relies on the mask hierarchy to determine which parts of an image to render.
</Info>

<Divider />

## Best practices

* All inner layers used for masking must remain under the **mask object**.
* Group these inner layers properly so only the intended images are included.
* Perform masking with a **single group** that contains all masked layers.

<Frame caption="Example of image masking in Figma">
  <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/pLntWJzZ3SjUx1lc/images/build-docs/create/figma/figma-design-guidelines/image-masking/image-masking-example.webp?fit=max&auto=format&n=pLntWJzZ3SjUx1lc&q=85&s=f7138710382b886a23786bb8c09c8072" alt="Example of image masking in Figma" className="theme-image" width="1916" height="690" data-path="images/build-docs/create/figma/figma-design-guidelines/image-masking/image-masking-example.webp" />
</Frame>

<Divider />

<Card horizontal title="Back to guidelines" icon="arrow-left" href="/build/create/figma/figma-design-guidelines/overview">
  See all design guidelines for preparing your Figma files.
</Card>
