Skip to main content
Solved

May I develop a plugin to upload image?


Johnson

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.

Best answer by Gleb

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.

View original

18 replies

Gleb
  • Power Member
  • 4707 replies
  • Answer
  • March 26, 2021

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.


Johnson
  • Author
  • 5 replies
  • March 28, 2021

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


Gleb
  • Power Member
  • 4707 replies
  • March 28, 2021

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


Johnson
  • Author
  • 5 replies
  • March 28, 2021

🤔, 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?


Gleb
  • Power Member
  • 4707 replies
  • March 28, 2021

Have you looked into using a REST API? I think that might work: https://www.figma.com/developers/api


Johnson
  • Author
  • 5 replies
  • March 28, 2021

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.


Gleb
  • Power Member
  • 4707 replies
  • March 29, 2021

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.


Gleb
  • Power Member
  • 4707 replies
  • April 2, 2021

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.


Johnson
  • Author
  • 5 replies
  • April 6, 2021

Thank you so much, it’s very helpful.


FE-Sakamoto

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.


FE-Sakamoto

I think upload image to CDN has’t modify Figma UI.


Johnson
  • Author
  • 5 replies
  • April 7, 2021

FE-Sakamoto

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


Gleb
  • Power Member
  • 4707 replies
  • April 7, 2021

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


FE-Sakamoto

it works!
image


Gleb
  • Power Member
  • 4707 replies
  • April 7, 2021

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


Igor_Adamenko

Does not work for me 🤔

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.


Gleb
  • Power Member
  • 4707 replies
  • April 7, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings