Photo Gallery
Definition
A photo gallery is a page built around images rather than text. The common shape is a grid of thumbnails, each opening a larger view, with captions and sometimes a download. The audience is open — friends, visitors, clients browsing your work, whoever finds the link — which is what separates it from a client gallery, where one named person opens their own proofs behind a password. Galleries are heavy by nature: fifty frames straight off a camera are easily 200 MB, and a page serving those directly is unusable on anything but a fast connection. Building one well is mostly a matter of sending the right size of image at the right moment.
Why It Matters
Image weight is the whole story. A 5 MB photograph resized to 1600 pixels wide and saved as WebP usually comes out in the low hundreds of kilobytes, so a forty-image gallery falls from something near 200 MB to well under 20 — the difference between a page that works on a train and one that stalls. Nobody reports a slow gallery; they simply close it. There is a cost on the other side too: if full-resolution originals sit directly behind the thumbnails on a public page, anyone can take them, and your bandwidth pays for every attempt.
How It Works
Generate two sizes of every picture: a thumbnail of a few hundred pixels for the grid, and a display version around 1600 to 2000 pixels wide for the larger view. Serve the grid with lazy loading, the loading="lazy" attribute on each img element, so the browser fetches what is near the viewport instead of all forty at once. Use responsive images as well — a srcset listing two or three widths with a sizes hint — and a phone pulls the small file while a desktop pulls the large one. Give every image alt text describing what is actually in it, both for screen readers and because that text is what a search engine has to work with. Then let caching do the rest: photographs never change once published, so they are the ideal thing to serve with a long Cache-Control lifetime.
Real-World Example
A ceramicist puts her studio work at kiln-and-clay.99helpers.site — 60 pieces, each a 280 KB WebP display file with a 30 KB thumbnail, uploaded as one folder. The gallery comes to 19 MB against the 340 MB the originals occupy, and it loads at a craft fair on two bars of signal. The view counts tell her which pieces people open, which is what she decides to bring to the next fair.
Common Mistakes
- ✕Uploading straight from the camera — the browser will happily scale a 6000-pixel image down to 400 pixels on screen, but only after downloading every byte of it
- ✕Using one file for both the thumbnail and the full view — the grid then costs as much to load as opening every photograph at once
- ✕Leaving alt text empty throughout — a screen reader announces forty unlabelled graphics, and a search engine has nothing to index
Related Terms
Client Gallery
A client gallery is a private set of images delivered to one client — proofs from a shoot, a finished selection, images to choose from — normally behind a password and often with an end date. Unlike a public gallery, it is not meant to be found.
Image Hosting
Storing image files somewhere on the web and serving them at addresses that can be dropped straight into an img tag, an email or a marketplace listing. The useful output is the address, not the upload.
Lazy Loading
Lazy loading defers fetching an image or iframe until the visitor is close to scrolling it into view, so only what is actually looked at gets downloaded. In a browser it is one attribute: loading set to lazy.
Responsive Images
Responsive images means publishing the same picture at several sizes and letting the browser pick the one that fits. The srcset and sizes attributes are how you describe that choice in HTML.
Digital Portfolio
A selection of your finished work published at one web address you can send to anybody. It is a place to look at what you have made, not a profile on someone else's platform.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →