Three photos from a shoot: one wide shot of the studio, one tall portrait of the maker, one square close-up of the product. Put them in a grid and two get cropped. Put them in masonry and they stack into columns of uneven length. What you wanted was the thing magazines do: all three on one line, the same height, edge to edge, each at its own shape. In Snug Gallery that is the Row layout. This guide explains how it sizes the images, where it works, and the three ways it goes wrong.
What Row does, in one sentence
Row places every image in the gallery on a single line, gives them all the same height, and makes each one as wide as its proportions need so that the line fills the section exactly.
Nothing is cropped. A landscape photo ends up wide, a portrait ends up narrow, and the height is whatever makes the widths add up. This is usually called a justified layout, after justified text, where each line is stretched to meet both margins. Flickr and Google Photos made it familiar. They build many rows; Snug Gallery's Row builds one, on purpose. For many rows of mixed shapes, masonry is the layout to use, and the layout comparison guide covers how the two differ.
How the widths are worked out
Each image has an aspect ratio: width divided by height. A 3:2 landscape is 1.5, a square is 1, a 2:3 portrait is about 0.67. The layout hands out the available width in proportion to those numbers.
Take the three photos from the introduction in a section 1200 pixels wide, with the default 12 pixel spacing. Two gaps leave 1176 pixels for images. The ratios add up to 3.17. The landscape gets 1.5 parts of that, about 557 pixels. The square gets 371. The portrait gets 248. Divide any of those widths by its ratio and you get the same height, 371 pixels, which is the point.
You never enter these numbers. The block reads each image's proportions from Shopify and the browser does the division, so the row adjusts itself when the section gets wider or narrower, and when you add or remove an image.
The same sum is used for something shoppers never see. Each image tells the browser roughly what share of the screen it will occupy, so a narrow portrait in a five-image row downloads a small file and the wide shot next to it downloads a larger one. A row of five does not cost five full-width downloads.
How many images suit a row
Because everything shares one line, the count decides the height. More images means a shorter row. In the 1200 pixel section:
Three mixed images give a row about 370 pixels tall. Five give roughly 220. Eight are down near 130, and twelve are a strip of thumbnails about 75 pixels high. None of these is wrong, but they are different things. Three to five reads as a set of photographs. Six to eight reads as a band. Past that it is a contact sheet, and shoppers will only see the images properly if the lightbox is on.
So choose the count for the job. A row of four between two sections of a home page is a divider with content in it. A row of six logos under the hero is a press strip, and the guide to logo walls uses Row for exactly that. If you have twenty photos, this is not the layout for them.
Three ways it goes wrong
Too few tall images. Two portraits alone would need a row almost 900 pixels tall to fill 1200 pixels of width. The layout stops that: no image is allowed to be taller than 640 pixels, or 70% of the screen height if that is smaller. When the cap applies, each image stays at its proportions, sits centred in its share of the row, and you see space on either side of it. If your row has visible gaps left and right of the photos, this is why. Add a third image or a landscape one and the row drops under the cap.
One extreme shape. A panorama three times as wide as it is tall, next to a portrait, takes about 970 of the 1200 pixels and leaves the portrait a 216 pixel sliver. The arithmetic is doing what it should. The fix is editorial: give the panorama its own gallery block, or crop it to something closer to 2:1 before uploading.
Expecting the Image shape setting to apply. The block has an Image shape setting with Square, Landscape, Portrait and Wide options. Row ignores it, and so does masonry, because both exist to keep original proportions. If you want every tile the same shape on one line, choose Grid, set the columns to the number of images and pick the shape there.
What happens on phones
A justified row of five on a 390 pixel wide phone would be about 60 pixels tall. So under 750 pixels of screen width the layout changes. The images are laid out in columns, using the Columns on mobile setting, every tile the same width, and they wrap onto as many lines as they need. Each image still keeps its own proportions, so within a line a portrait is taller than a landscape. The height cap is lifted too.
With two columns on mobile, a row of four becomes two lines of two. With one column it becomes a simple stack. Three images in two columns leaves the third on its own line at half width, aligned to the start. If that bothers you, use an even number of images or set mobile columns to one.
Check this in the theme editor's mobile preview before publishing. The desktop row and the phone layout are different enough that approving one tells you little about the other.
Captions, links and the lightbox
Everything that works on a tile in other layouts works here. An image can open the lightbox, link to a product or collection, and carry a caption. Captions below the image make the bottom edge of the row uneven if one caption wraps to two lines and its neighbour does not, so for a clean strip use overlay captions or keep them to a few words. The captions guide compares the modes.
For a row of small images, leave the lightbox on. It opens the full image at up to 2048 pixels wide whatever size the tile was, and arrow keys or a swipe move along the row.
Setting one up
- In the Snug Gallery app, create a gallery, choose the Row layout and add three to six images. Mixed shapes are fine. Put them in the order you want them left to right.
- Open the theme editor, go to the template where the row belongs, and add the Snug Gallery app block.
- Choose the gallery in the block settings. The layout comes with it.
- Set Spacing between images. 12 pixels is the default; 4 to 8 gives a tighter, more editorial strip, and 0 makes the images touch.
- Set Columns on mobile to 1 or 2 and look at the mobile preview.
- If the row is too tall or shows side gaps, add an image. If it is too short, remove one. The count is the height control.
When to pick something else
Row is a narrow tool. Pick Grid when every image should be the same shape. Pick Masonry when there are more than eight images and none should be cropped. Pick Carousel when there are many images and one line of space. Pick Slider when one image at a time should have the whole width. Row is for the case in between: a handful of photographs of different shapes that belong together and deserve to be seen side by side, whole.
Frequently asked questions
How do I make a justified image row on Shopify without code?
Add the Snug Gallery app block in the theme editor, pick a gallery with three to six images that uses the Row layout. The block reads each image's proportions and sizes the widths so the images share one height and fill the section. No Liquid or CSS is involved.
Why are there empty spaces beside the images in my row?
The row hit its height cap. No image is shown taller than 640 pixels or 70% of the screen height, so with only one or two tall images each one is centred in its share of the row. Adding another image, or a wider one, brings the natural height under the cap and the spaces close.
Can the Row layout wrap onto several justified rows?
Not on desktop. Row is one line, however many images the gallery holds, so each extra image makes the row shorter. On screens under 750 pixels wide it switches to equal-width columns that wrap. For several rows of uncropped images on desktop, use the Masonry layout.
Does Row crop my photos?
No. Every image keeps its original proportions, and the Image shape setting is ignored for this layout. The only time an image is shown smaller than its slot is when the height cap applies, and then it is scaled down whole, not cropped.
More guides
- Before and after photo gallery on a Shopify page
- Snug Gallery on Hydrogen or a headless Shopify store
- Galleries on a multilingual Shopify store: what translates
- Customer photos and GDPR: what a gallery app stores
- Video thumbnails in a Shopify gallery: pick the poster
- How to add a photo gallery to a Shopify store (no code)
- How to make a shoppable lookbook on Shopify
- Shopify gallery not loading? Why gallery apps vanish
- Cozy Image Gallery alternative: a 20-minute migration
- Who owns your gallery images? Shopify Files vs app-hosted
- Shopify app still charging after uninstall? What to do
- How to tell if a Shopify app is abandoned: a checklist
- Masonry, grid, carousel or collage: Shopify gallery layouts
- Accessible Shopify image gallery: an EAA-era checklist
- Instagram feed broken on Shopify? Own your customer photos
- Shopify video gallery: upload, YouTube or Vimeo?
- Protecting gallery images on Shopify: right-click blocking
- Does a photo gallery slow down your Shopify store?
- Shopify gallery images in Google Images: an SEO guide
- Shopify Canvas and Snug Gallery: what works today
- Build a Shopify gift guide page that is not a collection
- Replaced an image in Shopify but the old one still shows?
- Build a portfolio page on Shopify that still sells
- Link to a pre-filtered Shopify gallery from menus and emails
- Lifestyle photos on a product page: media or gallery block?
- Clickable gallery images on Shopify: link to collections
- Shopify Rollouts: launch a sale theme, discount and gallery
- Add a photo gallery to a Shopify blog post
- Gallery order on Shopify: manual, newest, A to Z or random
- Shop-the-look pins: sold out, unpublished and variant rules
- Pinterest save button on Shopify gallery images
- Custom CSS for a Shopify gallery block, safely scoped
- Gallery captions on Shopify: title, text, alt and placement
- Moderating customer photos: approve, reject, delete
- Gallery slider autoplay in Shopify: interval, pauses, motion
- Import images into a Shopify gallery from a URL
- Carousel or slider: picking the right Shopify gallery layout
- The customer photo form: what shoppers see, field by field
- Snug Gallery plans: what the limits mean in practice
- Gallery upload failed: every error message explained
- The gallery lightbox: keys, swipe, captions and video
- Reuse product photos and Shopify Files in a gallery
- Removing a gallery image: what is deleted, what stays
- Gallery tile says File missing: cause and fix
- Snug Gallery block settings: every option explained
- Switching Shopify themes: what happens to your galleries
- Transparent background images in a Shopify gallery
- iPhone HEIC photos in a Shopify gallery
- Gallery tags and the filter bar: limits, naming, order
- iPhone videos (MOV, HEVC) in a Shopify gallery
- Snug Gallery on an Arabic or Hebrew Shopify store
- Add a gallery to a Shopify collection, cart, 404 or blog
- Theme app add-ons: a Shopify gallery bundled with the theme
- Holiday customer photo contest on Shopify: gallery setup
- Press logos and an As seen in logo wall on Shopify
- Reviewing Snug Gallery in Shopify's Settings > Apps
- Shopify gallery image size and aspect ratio: a guide
- An About page photo gallery for your Shopify store
- A menu photo gallery for a cafe or bakery Shopify store
- Gallery photos and AI training: robots.txt on Shopify
- Which image formats work in a Shopify gallery (and why)
- Alternating image and text rows on Shopify: List layout
- An event recap photo gallery for your Shopify store
- Shopify gallery hover effects: zoom, lift, shine, grayscale
- Shopify collage gallery: which photos get the big tiles
- Shopify masonry gallery: what order do the photos go in?
- A stockists page on Shopify with shop photos, by city
- A sold archive gallery on Shopify for one-of-a-kind work
- Show gift wrap options on Shopify with a photo gallery