sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

support images

Open ishan28mkip opened this issue 8 months ago • 0 comments

Tell us how you think we can improve Sandpack

Packages affected

  • [x] sandpack-client
  • [x] sandpack-react

What is this feature?

Ability to add images that can be imported. I do understand that adding image support is not on the radar. https://github.com/codesandbox/sandpack/issues/101. But a simple thing that can be allowed might be to just push things to a internal public folder and then just load them from their as is.

I think it is important to support images as lot of libraries will want to show images, for example all component libraries have avatar or other components that use images a lot.

Current workaround is to convert every image to datauri which is ok I think but the public folder approach might be better.

How would your idea work?

answered above

Do you have any examples of how you would like to see us implement it?

answered above

When I get some time will try to also figure out how it might be possible and make a POC.

ishan28mkip avatar May 26 '24 17:05 ishan28mkip