# 0041. The share image is the record's own picture

- **Status:** Accepted
- **Date:** 2026-09-24

## Context

`ActiveRecord::getImage()` read a `picture` relation that the gallery models (articles, locations, storages,
services) do not have, behind an `empty()` that swallowed the exception — so every page shared the site-wide
`/images/og.png`. `og:video` carried the image URL.

## Decision

`getImage()` resolves `picture` → first published photo by `orderNumber` → nothing, and returns the
`Picture::VERSION_OG` version (1200×630 `cover`, JPEG), absolute. `Storage` falls back to its location's image.
The head states `og:image:width`, `:height`, `:type`, `:alt`; the fallback is measured from the file.
`ActiveRecord::$ogType` / `getOgTags()`: an article is `article` with its published and modified times.
`og:video` reads the model's `video`.

## Alternatives

- **An existing large version.** Different ratios on different pages, none of them the one platforms crop to.
- **The original file.** Uncropped, and a PNG photograph is several times its JPEG weight.

## Consequences

- Platforms keep what they scraped before: a changed share image needs a manual re-scrape (Facebook Sharing
  Debugger, LinkedIn Post Inspector).
- An article's lead photo is also its first photo by `orderNumber`; the relation is ordered for that reason.
