Skip to content

docs(readme): explain how to actually use the LQIP placeholders - #35

Merged
JexPY merged 1 commit into
masterfrom
docs/lqip-usage
Aug 24, 2026
Merged

JexPY merged 1 commit into
masterfrom
docs/lqip-usage

Conversation

@JexPY

@JexPY JexPY commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Follow-up to #34. That PR added dominant_color and blur_data_url to the readme's sample record and one bullet describing them — but nothing on how to consume them, which omits the single thing an integrator has to know.

blur_data_url is a real 16px image and is deliberately not pre-blurred. Dropped into an <img> untouched it renders as a visibly blocky postage stamp rather than a placeholder. Verified visually against real iPhone photos — this is not a theoretical concern, it is what the field looks like without CSS blur:

As stored a 12×16 WebP, sharp pixels
With filter: blur(16px) the intended placeholder

Adds a "Rendering placeholders while an image loads" subsection under The Record with:

  • A size table for both fields (7 bytes and 135–170 bytes measured on real photos).
  • A copy-pasteable HTML/CSS pattern, including transform: scale(1.1) — without it the blur leaves visible soft edges at the element borders.
  • The Next.js placeholder="blur" / blurDataURL equivalent.
  • The two behaviours that surprise people: both fields are present on private records, unlike storage_key / renditions / thumbnail_url / poster_url (they carry no key and no URL, so there is nothing to withhold); and both are null for pre-feature and non-image records, so consumers must treat them as optional.

docs/FILEMANAGER_INTEGRATION.md already covered this. The readme is where people actually start, and it is the document a consuming team reads before writing any integration code.

Docs only — no code, no schema, no behaviour change. ruff format --check passes (it formats Python blocks inside Markdown, and the readme is in scope); the added snippets are HTML/CSS/JSX and are fenced as such.

The readme gained the two fields in the sample record but no guidance on
consuming them, which leaves out the one thing an integrator has to know:
`blur_data_url` is a real 16px image and is deliberately NOT pre-blurred, so
dropped into an `<img>` untouched it renders as a visibly blocky postage
stamp rather than a placeholder. Verified visually against real iPhone photos.

Adds a "Rendering placeholders while an image loads" subsection under The
Record with a copy-pasteable HTML/CSS pattern (including the `scale(1.1)`
trick that hides the soft edges blur leaves at the borders), the Next.js
`placeholder="blur"` equivalent, and the two behaviours that surprise people:
both fields are present on private records unlike every other extra, and both
are null for pre-feature and non-image records.

docs/FILEMANAGER_INTEGRATION.md already covered this; the readme is where
people actually start.
@sonarqubecloud

Copy link
Copy Markdown

@JexPY
JexPY merged commit ed64031 into master Aug 24, 2026
12 checks passed
@JexPY
JexPY deleted the docs/lqip-usage branch August 24, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant