Listing Photos and Publish
The Photos step of the listing wizard (picking, cropping, grouping, geotag rules, amenities) and what the final submit sends and produces.
This page covers step 2 of the wizard and the submit button on step 3. For how the wizard is entered and for the Details and Location fields, see Create a listing.
Where it lives
| Screen route | File | Who sees it |
|---|---|---|
/property/create-edit-listing-photo-amenities | app/property/create-edit-listing-photo-amenities.tsx | Agents and landlords (step 2, Photos) |
| Crop screen (full-screen modal, no route) | components/app/photo-crop-modal.tsx | Opens after every pick |
/property/create-edit-listing-location | app/property/create-edit-listing-location.tsx | Agents and landlords (step 3, holds the submit button) |
Supporting code:
| Concern | File |
|---|---|
| Room groups, photo limits | lib/image-tags.ts |
| Crop and resize | lib/photo-crop.ts |
| Photo GPS rules | lib/photo-geotag.ts |
| Amenity rules | lib/amenities.ts |
| Submit blockers | lib/listing-validation.ts |
| API calls | services/listings/listings-api.ts |
Before you start
- The Details step has passed its own validation (or, in edit mode, the user tapped Manage photos).
- Photo library permission. It is requested the first time Add Photos is tapped.
- If the admin has photo geotagging switched on, photos must carry GPS data and be taken near the property, so the phone camera needs location turned on when the pictures are taken.
- A KYC-verified account. The backend rejects the create request otherwise.
Library only
Photos come from the device photo library. The screen does not open the camera, and although the create endpoint accepts videos, the app has no video picker.
Flow
Step 2: Photos
- The header row shows Property Photos and a counter such as
3/20 Photos. The maximum is 20 photos per listing; the minimum is 4. - A hint line under it reads "Add 1 more photo. Listings need at least 4." (with the number still missing) and switches to "Minimum of 4 photos met" with a green tick once satisfied.
- If
GET /api/v1/settingsreturnsimageGeotagging.enabled, a second hint shows the rule, for example "Photos must be taken within 200 m of the property." In strict mode it adds "Every photo needs location data, so keep location turned on for your camera." The settings are refetched each time the screen opens. - UPLOAD TO GROUP is a row of chips. The selected chip is the room group new photos are filed under. Presets: Living Room, Bedroom, Kitchen, Bathroom, Dining Area, Exterior, Balcony. Each chip shows how many photos it holds.
- New group turns into a text box (placeholder "e.g. Rooftop", 30 characters maximum). The name is trimmed and committed on Done or when the box loses focus. A name that matches an existing group, ignoring case, selects that group instead of creating a second one. A custom group that never receives a photo is forgotten when the screen closes.
- Tapping the Add Photos tile (its subtitle reads "to" plus the selected group) asks for library permission and opens the system picker with multiple selection, limited to the number of slots left. The tile disappears at 20 photos.
- Every pick goes through the crop screen (next section) and then lands in the gallery under the selected group.
The gallery is drawn as one section per group, in the order each group first appears. On each tile:
- COVER PHOTO marks the very first photo of the whole list. Stored photos come before new ones, so on an edit the cover stays the stored first photo.
- NEW marks photos picked in this session that are not uploaded yet.
- The bin icon removes the photo from the form.
- The button under the tile shows the photo's group (or "Choose a group" for a photo stored before grouping existed, which sits under the Untagged heading). Tapping it opens the Move photo to sheet listing every group.
All of this is held in the listingForm slice: existingImageUrls, newImageUris, imageTags, savedImageTags and imageGps.
Cropping and compression
The crop screen is a dark full-screen modal titled Crop photo. For a batch its subtitle reads "Photo 2 of 5 · Kitchen"; for a single photo it shows just the group.
- A crop frame with a rule-of-thirds grid sits over the photo. Drag the frame to move it or drag a corner to resize it.
- Shape presets: 4:3 (default), 16:9, 1:1, Free. The chosen preset carries over to the next photo in the batch.
- Crop & next (or Crop & add on the last photo) crops to the frame. Use whole photo keeps the full picture.
- Add all N uncropped adds the current photo and the rest of the batch without cropping.
- Cancel discards the whole batch, including photos already cropped in it.
Whatever the choice, each photo is prepared on the device before it joins the gallery:
| Rule | Value |
|---|---|
| Longest edge | Shrunk to at most 2400 px |
| Output | JPEG at quality 0.85 |
| Untouched | A photo that is neither cropped nor larger than 2400 px is used as picked |
| Processing failure | The photo is added as picked |
If a photo cannot be displayed, the screen says "This photo can't be previewed for cropping. It will be added as it is." with a single Next photo or Add photo button.
The GPS position is read from each photo's EXIF data at pick time, before cropping (cropping strips EXIF), and stored as [longitude, latitude] in imageGps. A photo with no position, or with 0, 0, has no entry.
Amenities
Under Key Amenities:
| Toggle label | Stored value |
|---|---|
| High Speed Wi-Fi | wifi |
| 24/7 Security | security |
| Private Parking | parking |
| Fitness Center | gym |
| Swimming Pool | pool |
- Add custom amenity opens a text box (placeholder "e.g. Borehole", 40 characters maximum). Typing the name of a preset switches that toggle on instead of adding a duplicate; a name already on the listing is ignored.
- Custom amenities are listed below the toggles with a remove icon. Amenities added on the web that have no toggle here (
ac,kitchen,pet,garden) appear in this list as Air Conditioning, Smart Kitchen, Pet Friendly and Garden. - A listing can carry at most 40 amenities; the add row is disabled at the limit.
Leaving the Photos step
Continue to location requires at least 4 photos in total. With fewer, an alert titled Add more photos shows the same "Add N more photos. Listings need at least 4." message and the hint line turns red. Otherwise the app pushes /property/create-edit-listing-location.
Submit: pre-flight checks
Tapping Create Listing or Update Listing on the Location step runs two checks before any request.
- Blockers. Every rule from all three steps is checked again. If anything fails, an alert titled Finish your listing lists the problems, and an amber card appears above the button headed "1 item needs attention" or "N items need attention". Problems that belong to another step carry a Fix in Details or Fix in Photos link that returns to that screen. The photo blocker reads "Needs at least 4 photos, you have 2".
- Geotag check. If geotagging is enabled and the pin is set, each photo added in this session is compared with the pin. A failure shows an alert titled Check your photos (create) or Check your new photos (edit) with a message such as "Photos must be taken within 200 m of the pinned location: photo 2 (1.4 km away)." In strict mode, photos without GPS are also refused: "Photo 3 has no location data. Take it at the property with location turned on for your camera." Photos are numbered in upload order. Stored photos are not rechecked.
While requests are in flight the button shows a spinner and is disabled.
Submit: create mode
One multipart request carries everything:
POST /api/v1/property/create
| Part | Content |
|---|---|
title, description, type | From the Details step |
location | JSON: state, lga, community, street (with the unit appended), optional nearestLandmark, coordinates as [longitude, latitude] |
details | JSON: squareFeet, plus bedrooms and bathrooms only for categories that have them |
pricing | JSON: rentPrice or salePrice, currency, and rentDurationYears for a rent listing |
shortLet | JSON, Shortlet only: maxNights (default 30), minNights (default 1), nightlyPrice |
availability | JSON: availableFrom (today's date; there is no field for it in the form) |
amenities | JSON array of preset keys and custom names |
images | One file part per new photo |
imagesMetadata | JSON array matched to images by index: address, coordinates, gps when known, tag |
On success the form is reset and the app replaces the wizard with /(tabs)/listings. There is no success toast; the new listing simply appears in the list.
Submit: edit mode
Up to three requests, in this order:
POST /api/v1/property/:id/imageswith the new photos and theirimagesMetadata. Skipped when no photo was added.PATCH /api/v1/property/:id/images/tagswith a list ofurlandtagpairs for stored photos whose group changed. Skipped when nothing moved.PATCH /api/v1/property/:idwithtitle,description,pricing(rentPriceandrentDurationYears, orsalePrice) andamenities.
Then the form is reset and the app replaces the wizard with /property/manage-property for the same listing, which refetches it.
What an edit does not save
The update request carries only title, description, price, rent duration and amenities. Changes to category, bedrooms, bathrooms, area, stay length and every Location field (including the pin) are accepted by the form but never sent. Switching between Rent and Sale sends the new price field but does not clear the old one. Removing a stored photo with the bin icon only removes it from the form: no delete request exists in the app, so the photo is still on the listing afterwards. For a short let, an edited price updates pricing.rentPrice but not shortLet.nightlyPrice.
Failure
Any failed request stops the sequence and shows an alert titled Error with the server's message, or "Something went wrong." when there is none. The form keeps its values so the user can retry.
States and edge cases
- Permission denied. Alert Permission required, "Please allow access to your photo library in Settings." Nothing is picked.
- Upload limits. The app caps a listing at 20 photos. The API accepts up to 20 image files per request and 10 MB per file, and checks file extensions against its allowed formats. On
POST /api/v1/property/:id/imagesthe server also silently drops anything beyond 50 photos per listing. - Server-side validation. The API repeats the title, description, area, room, stay-length, amenity and pin rules and answers 400 with the messages joined by semicolons. It repeats the geotag check too and returns the same wording.
- Not KYC verified. Create returns 403 "Landlord must complete KYC verification before listing properties", shown in the Error alert.
- Partial edit failure. If the image upload succeeds and a later request fails, the uploaded photos stay on the listing while the form still holds them as new, so retrying uploads them a second time.
- Geotag check with no pin. The device-side check is skipped while the pin is unset, but create mode cannot reach submit without a pin anyway.
- Platform settings unavailable. If
GET /api/v1/settingshas not loaded, no geotag hint is shown and the device-side check is skipped; the server still enforces it.
What happens next
- Status. A newly created listing gets the status
pending_verification. It shows the Pending badge on the Listings tab and on Manage Property, and it does not appear in public search. - Duplicate check. The backend compares the new listing with existing ones nearby or in the same state, LGA and community and, on a match, opens a duplicate flag for the admin team. The mobile app shows no duplicate warning to the person listing; the only visible effect is that the listing stays pending until an admin clears the flag.
- Legal review. If an admin has configured a default legal partner, the listing is automatically assigned to that lawyer. Otherwise it waits without an assignment; assigning a lawyer by hand is covered on the Legal Team page.
- Going live. When the assigned lawyer records a verified decision, the listing's
legalStatusbecomeslegally_verifiedand, provided no duplicate flag is open, its status changes tolisted(badge Active). - After an edit. The update does not change the listing's status and does not re-run the duplicate check.
Create a Listing
How the three-step listing wizard is entered, what the Details and Location steps collect, and how the form is held between steps.
Manage Listings
The Listings tab, the Manage Property screen and the owner listing page, with every action an agent or landlord can take on an existing listing.
HomeLink Hub