In figma you set the export options for different layers (say png of x resolution, and svg), and you can export them all at once. Unless I am missing something, this should solve your problem.
Thankfully in year 2023 it’s not a problem anymore since everything can be vector.
I’m talking about 2015-16 when you had to use raster images for components and figma was not even a thing.
But thank you nonetheless.
My current complaint about figma is that even if I take time to set up all the dynamic scaling and layouts I don’t think it as useful for devs as I hoped it would be in my mind. (As in I thought u can just copypaste the code snippet). But i’m not quite sure as I have not done much IC design work in years aside some odd jobs for friends and perhaps they are just shit programmers or I am not using it right.