Listing photos and media
How photos are grouped, cropped, limited and checked against the listing's location before upload.
Where it lives
The gallery is not a route of its own. It is step 2 of both listing forms.
| Used on | Component file | Access |
|---|---|---|
/listings/create, step 2 | src/views/app/listings/components/step-media-amenities.tsx | signed-in, agent or landlord |
/listings/:id/edit, step 2 | src/views/app/listings/components/step-edit-media.tsx | same |
| Group picker, drop zone, grid | src/views/app/listings/components/tagged-gallery.tsx, use-gallery-tags.ts, image-tags.ts | same |
| Crop dialog | src/views/app/listings/components/photo-crop-dialog.tsx, photo-crop.ts | same |
| Geotag check | src/views/app/listings/components/photo-geotag.ts | same |
| Metadata dialog | src/views/app/listings/components/metadata-extractor.tsx | create flow only |
Before you start
- You are on step 2 of Create a listing or Edit and publish listings.
- The listing already has a map pin from step 1. The geotag check compares photos against it.
- Photos are image files. For geotagged listings, take them at the property with the camera's location setting on, and upload the originals (screenshots and images saved from chat apps usually carry no location).
Flow
Add photos to a group
Every photo belongs to a group (a room or area). You pick the group first, then add that group's photos.
- Under Upload to group, click a group chip. The presets are Living Room, Bedroom, Kitchen, Bathroom, Dining Area, Exterior and Balcony. Living Room is selected first. A chip shows how many photos the group already holds.
- To add your own group, click New group, type a name (30 characters at most, placeholder "e.g. Rooftop") and press Enter or click away. Escape cancels. A name that matches an existing group, ignoring letter case, selects that group instead of creating a second one.
- Drag photos onto the drop zone ("Drag and drop Kitchen photos") or click it to browse. Several files can be chosen at once. Files that are not images are ignored.
- The crop dialog opens for the batch (next sub-flow).
- Cropped photos join the gallery under their group heading. The counter reads "N of 20 photos uploaded".
- In the create flow, the metadata dialog opens automatically each time photos are added.
Nothing is uploaded at this point. Photos stay in the browser until the listing is published, saved as a draft, or the edit is confirmed.
Crop each photo
-
The dialog is titled "Crop photo" and shows "Photo 1 of 3 · Kitchen" (or just the group for a single photo).
-
Choose a shape: 4:3 (default), 16:9, 1:1 or Free. The frame starts as the largest centred crop of that shape; drag it or its handles to adjust. The chosen shape carries over to the next photo in the batch.
-
A line under the image shows the output size, for example "Saves at 2400 × 1800px".
-
Choose one of:
Button Effect Crop & next / Crop & add (last photo) Crops to the frame and moves on Use whole photo Keeps the full frame (still resized) and moves on Add all N uncropped Adds this photo and every remaining one whole, one at a time -
After the last photo the whole batch is added to the active group.
Closing the dialog before the last photo discards the entire batch. Clicking outside the dialog does not close it.
What the crop step does to the file:
| Rule | Value |
|---|---|
| Longest edge | Reduced to 2400 px when larger |
| Format | Re-encoded as JPEG at 85% quality, renamed with a .jpg extension; transparent areas become white |
| Left untouched | A photo that needs no crop and no resize and is 4 MB or smaller |
| Why | Keeps phone photos under the server's 10 MB per-file limit (stated in the code comments) |
If the browser cannot display a file, the dialog says "This browser can't preview" the file name, "so it can't be cropped. It will be uploaded as it is." and offers Next photo or Add photo.
Arrange the gallery
Photos are shown under one heading per group, in the order each group first appears.
| Control | Effect |
|---|---|
| Set as main | Moves the photo to the front of the gallery. The first photo carries the "Main image" badge and becomes the listing's cover |
| X on a photo | Removes it |
| Dropdown under a photo | Moves it to another group ("Choose a group" when it has none) |
Limits
| Limit | Value | What the user sees |
|---|---|---|
| Minimum | 4 photos | Hint: "Add N more photos. Listings need at least 4." It turns green as "Minimum of 4 photos met", and red after a failed attempt to continue |
| Maximum | 20 photos | Extra files are skipped with the warning "A listing can have up to 20 photos. N were not added." |
| Gallery full | 20 reached | Drop zone reads "Gallery is full (20 photos)" and "Remove a photo to add another." and stops accepting files |
| File type | Browser image/* | Other files are dropped silently |
| Group name | 30 characters | Longer input is cut |
Geotag check
The admin can require that photos were taken near the property. The rules come from GET /api/v1/settings (imageGeotagging.enabled, strict, maxDistanceMeters).
-
When the check is on, a line with a pin icon appears under the gallery title: "Photos must be taken within 500 m of the listing's address or landmark." (the distance is whatever the admin set, shown in metres or kilometres). In strict mode it adds "Every photo needs location data, so keep location turned on for your camera."
-
On Next Step the app reads the GPS position from each photo's original file (cropping removes it, so the original is kept for this) and measures the distance to the listing's pin.
-
If anything fails, a toast stays up for 10 seconds and the form does not advance:
Problem Message (example values) A photo is too far away "Photos must be taken within 500 m of the listing's address or landmark: photo 3 (2.4 km away)." Strict mode and a photo has no position "Photo 2 has no location data. Take it at the property with location turned on for your camera." Strict mode and the listing has no pin The "no map location yet" message from step 1 Photos are numbered from 1 in gallery order. Both messages can appear together.
-
When the listing is submitted, each photo's position is sent to the API as
gpsinsideimagesMetadata, and the API runs the same check again.
In non-strict mode, photos without a position are accepted; only photos with a position that is too far away are rejected. With the check off, no positions are compared at all.
Metadata dialog (create flow)
"Extracted Metadata & GPS Information" lists every photo in the gallery with what could be read from the original file: Latitude, Longitude, Altitude, Date/Time, Camera, Lens Model and Image Size. A progress bar runs while files are read. A file with nothing readable shows "No metadata found in this file".
- It opens by itself whenever the photo count goes up, and from the View Metadata button once the gallery has photos.
- It is read-only. It is a way to see, before submitting, which photos carry a location.
States and edge cases
- Edit flow differences. Stored photos and new photos share one grid. New ones carry a "New" badge and cannot be set as main (they are appended after the stored ones). There is no View Metadata button, and only newly added photos go through the geotag check; the toast is prefixed "New photos:". See Edit and publish listings.
- Custom groups with no photos. They are forgotten when the step is left.
- Photos from before tagging existed. They appear under the heading "Untagged" until moved to a group.
- Large batches. "Add all N uncropped" processes photos one at a time to avoid running out of memory, so it can take a moment.
- Unreadable position. A file with no EXIF position, or one recording 0, 0, counts as having no location.
No video upload
What happens next
- The first photo in the gallery becomes the listing's cover everywhere it is shown, including the listings table and global search.
- Group names are stored with each photo and drive the per-group tiles on the listing detail page.
HomeLink Hub