No images showing? Please help! #380
Unanswered
mellygriffin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I'm trying to use the gallery for my own website, but even when I have copied and pasted the code into its component, nothing will show up? I've checked the image links individually from the example and they work fine on their own, just don't show up on the site?
This is the code for the Gallery component:
`const images = [
{
src: "https://c2.staticflickr.com/9/8817/28973449265_07e3aa5d2e_b.jpg",
width: 320,
height: 174,
isSelected: true,
caption: "After Rain (Jeshu John - designerspics.com)",
},
{
src: "https://c2.staticflickr.com/9/8356/28897120681_3b2c0f43e0_b.jpg",
width: 320,
height: 212,
tags: [
{ value: "Ocean", title: "Ocean" },
{ value: "People", title: "People" },
],
alt: "Boats (Jeshu John - designerspics.com)",
},
{
src: "https://c4.staticflickr.com/9/8887/28897124891_98c4fdd82b_b.jpg",
width: 320,
height: 212,
},
];
export default images;`
And this is the page it's imported on:
`import './Art.css';
import { Gallery } from 'react-grid-gallery';
import images from '../Gallery/Gallery.jsx';
import { Link } from 'react-router-dom';
const Art = () => {
}
export default Art;`
Beta Was this translation helpful? Give feedback.
All reactions