-
Notifications
You must be signed in to change notification settings - Fork 471
PNG Static Assets #1281
Copy link
Copy link
Open
Labels
triageNew issues that needs considerationNew issues that needs consideration
Description
The documentation shows how to import a static SVG file, however I am not able to get it working with a PNG file.
I am not sure what format I need to provide the image in. I have tried raw bytes, base64, and am not getting any results.
Please advise and ideally update the documentation to show how to handle different kinds of file formats for static assets if they require different data.
<Sandpack
files={{
"/public/image.png": "", // What do I provide here?
"/App.js": `export default function App() {
return (
<>
<h1>Hello React</h1>
<img width="100" src="/public/image.png" />
</>
);
}
`,
}}
options={{
experimental_enableServiceWorker: true,
}}
template="react"
/>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triageNew issues that needs considerationNew issues that needs consideration