---
title: "Store photo-tag coordinates across image sizes"
description: "Model point and box tags with normalized coordinates so annotations survive resizing, cropping decisions, and multiple image variants."
canonical_url: "https://fanout.sh/system/archive/photo-tagging-coordinate-model"
md_url: "https://fanout.sh/system/archive/photo-tagging-coordinate-model.md"
access: "public"
---

# Store photo-tag coordinates across image sizes

Model point and box tags with normalized coordinates so annotations survive resizing, cropping decisions, and multiple image variants.

## Public overview

Photo Tagging Coordinate Model

When users tag people in photos, store positions relative to the image, not as absolute pixels.

Absolute coordinates break when the same image is served as multiple responsive variants.

This only works for one exact image size.

If the image is served as 512 x 384 , render the marker at:

For a face/object rectangle, store either:

All values should be normalized ratios from 0.0 to 1.0 .

For point-only tags, omit x2/y2 or store a small default box around the point.

Be explicit about which image the ratios refer to:

Space Use Case Risk --- --- --- Original upload Stable archival coordinates Later crop changes visible placement Cropped canonical image Matches current product display Needs transform if crop changes ML model input image Useful for detection pipeline May not match user-visible pixels Rendered viewport Easy for UI Wrong after resize, rotation, or DPR changes

The API should accept the client-visible point plus the displayed image dimensions or crop metadata. The server can then normalize into the canonical space.

Clamp markers to the visible image area. A tag outside the current crop should be hidden, moved to an edge affordance, or require a crop transform.

Design questions that affect storage:

Can users tag people who are not in the app? Can tagged users approve/remove tags? Are tags public, follower-only, or private? Do tags survive image crop edits? Are face boxes generated by ML and then user-confirmed? Can one photo have hundreds of tags?

Moderation And Privacy

Treat a tag as both geometry and a social edge. A row may need status:

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
