Figma Support Forum

May I develop a plugin to upload image?

Is it possible to add a upload button below the export button in read-only mode by develop a plugin?
I want to upload image to CDN directly in view-only mode.

No, it’s not possible. You cannot modify Figma UI with plugins. Plugins can only do what a regular Figma user can do manually, i.e. do various things with objects on canvas and their properties.

So I can not use any plugin in view-only mode?

Oh yea, this is another limitation, plugins can’t be opened by view-only users.

:thinking:, I want to develop a figma plugin or chrome extension to help my team improving
efficiency. Such as uploading pictures to CDN, converting picture parameter formats, etc.
Is there any other way to accomplish my requirements?

Have you looked into using a REST API? I think that might work:

But how could I know which node I selected. I want to do these operations in view-only mode, I must not give the modify authority to my team member. So I expect a method to extends figma in view-only mode.
I tried to develop a chrome extension, in this way I can modify figma’s UI, but I can not get window.figma api in extension sandbox.

I don’t know too much about developing extensions so not sure how to help. One way I can see possible is if you embed custom JS into the page (you can even do it with existing extensions such as User JavaScript and CSS). This way you definitely will have access to the API. And from there you can add a button that does something on click with the current selection.

Check out this browser extension: Figma Search Extension (Chrome, Firefox), works in “View only” It doesn’t do what you need but as far as I understand it interacts with the API and is open source, maybe it will help you.

1 Like

Thank you so much, it’s very helpful.

I want to develop a plugin in view-only mode which can

  1. export a node as PNG
  2. compress with tinyPng
  3. encode result to base64
  4. write base64 to clipboard

I have no idea how to implement it with chrome extension, do you have any idea? thx.

I think upload image to CDN has’t modify Figma UI.
this project may help you.

1 Like

I just create a Figma plugin, and I can use it in view-only mode.
command + /
typing plugin name

No, you can’t use plugins in view-only mode.

it works!

Wait what? How is this possible? How did I miss this?

Does not work for me :thinking:

I’ve installed the same plugin, but can’t find it in quick search menu in “View only”. Nor in a browser, or in a desktop app.

That’s strange, for me it’s working. :scream: Magic… Maybe there is some A/B testing going on.