Use a local image from the static folder in a Gatsby component

InstructorKyle Gill

Share this video with your friends

Send Tweet

Learn how to import static assets into components in alternative scenarios when it might be necessary, like if you couldn't use webpack.

Assets added to the static folder won't leverage Gatsby's performance optimizations so this isn't a recommended approach, and should be used as an escape hatch.