How to use local images
See original GitHub issueHello
In the sample I see how to use the Image component but how about images I have in my local repository?
- deck.mdx
- images/hero.jpg
This does not work
<Image
src='./images/hero.jpg'
style={{
width: '100vw',
height: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}>
## Background Image
</Image>
Variations I tried for src are
/images/hero.jpg
images/hero.jpg
All don’t show my image.
Many thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:15 (3 by maintainers)
Top Results From Across the Web
docker - How can I use a local image as the base image with a ...
I just realised that I've been using FROM with indexed images all along. So I wonder: How can I use one of my...
Read more >Two easy ways to use local Docker images in Minikube
First, we navigate to the app folder. Next, we build the Docker container via docker build -t pz/demo . , using the -t...
Read more >How to Use Own Local Docker Images With Minikube - Medium
First, we need to set the environment variable with eval command eval $(minikube docker-env) · Build the docker image with the Minikube's Docker ......
Read more >Using Local Docker Images With Minikube - Baeldung
Learn three different ways to run local Docker images in Minikube. ... We'll use Minikube to run the Kubernetes cluster.
Read more >How to use a local registry - MicroK8s
The following documentation explains how to use MicroK8s with local images, or images fetched from public or private registries. A familiarity with building, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does this work for y’all?
I had the same question. As a workaround i serve all my static files from another local server.
So basically you just do:
and next replace your package.json
scripts
section with the following:You will now be able to access your static files from
http://localhost:8081
as shown below: