Closed AnushreeDhar closed 4 years ago
hi @AnushreeDhar . I should implement and add that, you could also create a PR and send to me!
sure let me know which branch to use thanks!
You could use the develop
branch.
I think that we miss the url-loader,
file-loader
plugins in the webpack
thanks for your help !
@AnushreeDhar
Hi, I check that,
I create a simple CRA
, add local images and it seems like it works.
<ResponsiveGallery
images={[
{
src: require("./img.png"),
},
{
src:
"https://cdn.pixabay.com/photo/2017/03/23/13/23/stag-2168278_960_720.jpg",
},...]/>
You can see in the image below that it's local image:
If you are not using CRA
and you use webpack to config your project pls add file-loader
plugin to your webpack.config file:
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
options: {
esModule: false,
},
},
],
}
if you have any other question I will glad to help you.
okay mine require isnt working i tried with src: ${pic1}
, this worked! but thanks for your help
sure, if you have any other issue/suggestion pls contact me / open an issue,tnx!
I intend to use local images and not src from url.. is that a bug or will be taken up later?