Skip to content

Use each outlet's own article image as the news thumbnail - #8

Merged
mkiani12 merged 3 commits into
mainfrom
feat/news-real-article-images
Aug 28, 2026
Merged

mkiani12 merged 3 commits into
mainfrom
feat/news-real-article-images

Conversation

@mkiani12

Copy link
Copy Markdown
Collaborator

The thumbnails added last week were pictures from our own gallery, chosen to suit
each story. They looked fine, but they were not what the article showed — a reader
scanning the list was matching our photograph to someone else's headline.

Each item now carries the picture the outlet actually ran.

Item Image Credit
Landslide-dammed lakes (2024) The release's featured photo — Yen Joe and Liu Min with the study posters, Baige landslide on screen Photo: CUHK
SCMP tremors (2023) The article's lead photo — a seismograph trace on ruled paper Photo: Shutterstock
HK01 award (2022) Yen Joe at the briefing, screens showing the OBS and Axial Seamount Photo: 香港01
Croucher awards (2022) The three recipients on stage, Yen Joe at right Photo: CUHK
HKEJ interview (2022) The interview portrait Photo: 信報
CUHKUPDates (2021) The feature's lead portrait over still water Photo: CUHKUPDates

Credits

These pictures belong to whoever published them, so imageCredit is now a field
and it prints under the thumbnail. Two decisions in there:

  • It is on the page, not in a title attribute. A credit nobody can see is
    not a credit.
  • It stays short. The first pass spelled out "CUHK Communications and Public
    Relations Office" and it stacked into a four-line column under the 88px mobile
    thumbnail. The row already names the outlet beside it.

The SCMP picture is credited to Shutterstock, not to SCMP — their own caption
says so, meaning the outlet licensed it from an agency. Of the six, that is the
one where we have no plausible claim: the other five come from CUHK's own offices
or from outlets that photographed Yen Joe directly. It is also the most
replaceable, being stock imagery rather than a picture of the lab. Happy to drop
it if you would rather not carry it.

Documentation

image and imageAlt went into the schema last time but never into
_template.md or docs/ADD-NEWS.md, so the people the template exists for had
no way to learn a picture was even possible. All three fields are documented now,
including that dense multi-panel figures turn to mush at thumbnail size and that
anything not ours needs a credit.

Verification

  • astro check 0 errors; token contrast audit passes; Prettier clean
  • No overflow, touch-target or accessible-name problems across 14 routes × 4
    widths × 2 themes (112 checks)
  • Credit line measures 6.94:1 light / 8.38:1 dark at 11px, against the 4.5:1
    requirement for small text
  • Lighthouse /news 100 / 100 / 100 / 100, CLS 0 — and the page got
    lighter, 144 KB from 157 KB, because photographs compress better than the
    figures they replaced
  • The six gallery images they replaced are still used by the gallery and research
    pages, so nothing is orphaned

Mohammad Kiani added 3 commits August 28, 2026 14:37
The thumbnails were pictures from our own gallery, chosen to suit each story.
They looked fine, but they were not what the article showed, so a reader
scanning the list was matching our photograph to someone else's headline.

Each item now carries the picture the outlet actually ran: the CUHK release's
featured photo of Yen Joe and Liu Min with the study posters, SCMP's seismograph
trace, HK01's briefing shot in front of the seismometer slides, the Croucher
stage photograph, the HKEJ portrait, the CUHKUPDates feature image.

These belong to whoever published them, so `imageCredit` is now a field and it
prints under the thumbnail. Two notes on it:

  - It is on the page, not in a title attribute. A credit nobody can see is
    not a credit.
  - It stays short. Spelling out "CUHK Communications and Public Relations
    Office" stacked into a four-line column under the 88px mobile thumbnail,
    and the row already names the outlet beside it.

The SCMP picture is credited to Shutterstock rather than to SCMP, because
their own caption says so — the outlet licensed it, and the agency is the
owner worth naming.

Also documents `image`, `imageAlt` and `imageCredit` in the template and in
ADD-NEWS.md. They went into the schema last time but never into either, so the
people the template exists for had no way to learn a picture was even possible.
The map's colours were changed through the GitHub web editor, which does not
run Prettier, so main has been failing its formatting check since. This is
whitespace only: the script tag's attributes fit on one line.

The edit itself is left exactly as made, including dropping `async` from the
script tag — that looks deliberate and is not mine to revert.
@mkiani12
mkiani12 merged commit ecd28de into main Aug 28, 2026
2 checks passed
@mkiani12
mkiani12 deleted the feat/news-real-article-images branch August 28, 2026 11:18
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