Skip to main content
Question

Not getting frame images separately


Awais_Iqbal

Hi
I’ve written Rest API for images using
https://api.figma.com/v1/images/myfilekey
https://api.figma.com/v1/images/myfilekey?ids=123456
it has multiple frames but it is returning all frames in one image in response
{
“err”: null,
“images”: {
“node-id”: “image-path”
}
}
The image path that is returning , it is correct path but I can’t get all frames separately
But when I change the https://api.figma.com/v1/images/myfilekey to https://api.figma.com/v1/files/myfilekey then I get all frames separately.
How to resolve this issue?

This topic has been closed for replies.

12 replies

Awais_Iqbal
  • Author
  • 13 replies
  • January 26, 2023

@Gleb do you have any idea how to get all the images separately but not in one url.


tank666
  • 4873 replies
  • January 26, 2023

Add any desired IDs in the URL.

https://api.figma.com/v1/images/:file_key?ids=node_id,node_id,node_id

Awais_Iqbal
  • Author
  • 13 replies
  • January 26, 2023

Yes, I’m already using this method but it is returning all images into one as a one URL.
In one node, I’ve multiple frames. And API is merging all images into and returning as a one path


tank666
  • 4873 replies
  • January 26, 2023

That is, you want to get the image of the parent node without nested nodes (children)? I don’t think it’s possible without editing the file.


Gleb
  • Power Member
  • 4708 replies
  • January 27, 2023

I think you are having the exact same issue/misunderstanding as discussed in this thread: Exporting a particular image


Awais_Iqbal
  • Author
  • 13 replies
  • January 30, 2023

@Gleb I don’t want to get multiple images from the one artboard/frame.
But I have multiple artboards/frames and I want each artboard/frame as a separate image.

Thank you for your response


Gleb
  • Power Member
  • 4708 replies
  • January 31, 2023

Can you show the exact URL (only replace the file key) you are using to get the images? The URLs you shared in the original post don’t make much sense.


Hey @Gleb I am having the same issue. This is an example URL: ‘https://api.figma.com/v1/images/XCBeyksAtZVzrAD6aEyjZ4?ids=2:18,296:3609


Gleb
  • Power Member
  • 4708 replies
  • January 23, 2024

What’s the response you are getting?


Hey @Gleb, sorry I think I was just parsing it wrong! I get them all back 🙂


Do you know if there is a similar way to pass multiple ids to the comments API endpoint?


Gleb
  • Power Member
  • 4708 replies
  • January 24, 2024

You can only get all comments from a file, not specific ones.

https://www.figma.com/developers/api#get-comments-endpoint


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