Skip to content

feat: persist main_image_url column for reliable thumbnails #440

@zigzagdev

Description

@zigzagdev

Summary

Add main_image_url as a dedicated column on world_heritage_sites so every site has a guaranteed thumbnail URL surfaced through the API, eliminating the "No image" frontend display.

Why

The current world_heritage_site_images table is populated only when a site has 2+ images (see extractImageUrls filter count($imageUrls) >= 2 and the meta rule only_sites_with_multiple_images). Sites with 0–1 images therefore have no row, so the thumbnail JOIN returns null and the frontend renders "No image". UNESCO source provides main_image_url for every site, so storing it directly removes the problem at its root.

Out of scope

  • Reintroducing thumbnail_image_id / primary_image_url columns (those were dropped previously and are not coming back).
  • Rewriting world_heritage_site_images rules (gallery semantics stay as-is; this is a hero/thumbnail concern).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions