How can I export a ComponentNode as an image without shadow effects?

Hey everyone,

I’m currently trying to build a plugin that will convert Figma ComponentNodes into images using exportAsync. The user can select a component, click render, and it call exportAsync on the component and return the image bytes.

However, the image that is exported has a drop shadow effect. I want to export the image without any effects, if it is possible.

Thank you so much for your help, I greatly appreciate it.

Have you considered this way:

  1. Clone or create a node instance;
  2. Change the effects and/or effectStyleId properties;
  3. Export as image and delete clone/instance.