← ブログ

How to make a SmugMug race gallery searchable by bib number

How SmugMug visitor search reads keywords, where to put the Search Box block, how to scope it to one event, and tagging bibs by hand or with Bibbit.

A race gallery on SmugMug with two thousand photos and no search is a gallery most runners will close after a minute of scrolling. Making it searchable by bib number takes two things: a bib number on each photo, in the field SmugMug search reads, and a search box in the gallery, scoped so a runner typing 100 gets this race and not every 100 you have ever uploaded.

Both halves are easy to get slightly wrong. Here is how each one works.

Keywords are what search reads

bibbit.io/scan — review
1247882
1247
882

Detected bibs

1247Maya Ruiz
882Jon Okafor

Written to your gallery

1247

Maya Ruiz

event:spring-city-marathon

The bib number itself becomes the keyword, exactly what a runner types into the search box.

SmugMug's visitor search matches keywords. Not the filename, not a caption written in prose. The dependable way to make bib 1234 findable is to put 1234 in the photo's keywords, exactly as a runner would type it.

If the event has a roster, the runner's name goes in as a keyword too. On SmugMug a comma searches several keywords at once, so John, Doe finds a runner by name in the same box.

How visitor search works on SmugMug

There are two search fields on a SmugMug site and they behave differently.

The search field in your site header searches only the page the visitor is on, and it has no scope setting.

The Search Box content block is the one you want. You place it on a gallery or folder page in the Customizer, and its settings include a Scope: the current location, the whole site, a location you choose, or one the visitor picks. A box dropped on a Page defaults to the whole site. For most sites that is harmless. For a race photographer it means a bare bib number matches across every event, and the runner from Sunday's half marathon gets photos from three other races with a 100 in them.

Searches are also URLs, and the scope travels in the query string:

https://yoursite.smugmug.com/search?q=1234&scope=node&scopeValue=XXXXX

searches one folder for bib 1234, where the scope value is that folder's node ID. Drop the scope and /search?q=1234 searches your whole site. Only the site-root /search path accepts these links; a gallery's path in front of it returns a 404. Keyword pages exist too (/keyword/1234) but have no scope of any kind.

Visibility rules apply to all of it: logged-out visitors never see unlisted galleries or hidden photos in results. Signed in as the owner, you can search everything regardless, which is why your own test always passes.

Add the search box to the event

  1. Sign in to SmugMug and open the gallery or the event folder.
  2. Click Site in the top navigation, then Customize Design.
  3. In the Customizer, click Make This Gallery Custom in the upper right, or Make This Folder Custom for one box above the whole event. Skip this step and the box lands on every page of your site.
  4. Drag the Search Box block, listed under Discovery, onto the page above the photos.
  5. Hover over the block, click the wrench icon, and set Scope to this gallery or folder.
  6. Publish.

Tune it for bib numbers

On the block's Basic tab, set the placeholder to say what you want typed: Enter your bib number, or Bib number or name if you synced a roster.

The Advanced tab can force an extra search term onto every query. If the box has to live somewhere site-wide, add the race name there, so a visitor typing 100 actually searches 100 + spring half. The same tab can send results to your keywords page instead of the search page, if you prefer runners landing on a keyword listing.

Send runners a link that already works

your-gallery.smugmug.com
1247

34 photos found

A scoped search on the gallery host: the runner types a bib number and gets only that race.

A results email or a race organiser's page should carry the scoped search link, not the gallery homepage. A runner clicks search?q=1234&scope=node&scopeValue=XXXXX and is looking at their photos. The node ID is the folder's own; it is the same one Bibbit reads from SmugMug when it syncs a gallery.

Test it the way a runner will

Open a private window so you are signed out. Search a bib you know is tagged. If nothing comes back, check three things in order: the gallery is public and not password protected; the keyword is actually on the photo; the block's scope covers the gallery the photo is in.

Tagging by hand versus tagging with Bibbit

bibbit.io/scan — export & sync
SmugMugConnected

✓ Synced · 213 / 213

Sync

finish-line_0417.jpg, "1247, Maya Ruiz"

Download CSV
Export and sync: approved bibs and names pushed to SmugMug as keywords, or downloaded as CSV.

Everything above assumes the bib numbers are already on the photos. Getting them there is the slow part.

By hand, it is one photo at a time: open it, read the bib, type it into the keywords, next. With several runners per frame and a few thousand frames, that is a day or more of work after the race, and it is the part that most often gets skipped.

Bibbit does the reading. Connect SmugMug with one click of OAuth, pick the album, and it scans every photo for bib plates and faces, matches the numbers against your roster if you uploaded one, and groups photos of the same runner so the frames with a hidden bib get tagged with the rest. You review the results photo by photo and approve, fix or reject each one. Then one sync writes the approved keywords to the gallery: the bib number, the runner's name when there is a roster, and a bibtool:bibbit marker so a later sync recognises its own work. Existing keywords are never overwritten, and re-running never duplicates a tag. Photos are fetched, processed and discarded; nothing is stored.

The search box setup is identical either way, which is why it has its own walkthrough. The difference is whether the keywords are on the photos by Sunday night or by the following weekend.

Try it on your next race

Connect your SmugMug account, scan one album, and see the first bibs come back in minutes. Get started free, or read the full walkthrough first.