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).
Summary
Add
main_image_urlas a dedicated column onworld_heritage_sitesso every site has a guaranteed thumbnail URL surfaced through the API, eliminating the "No image" frontend display.Why
The current
world_heritage_site_imagestable is populated only when a site has 2+ images (seeextractImageUrlsfiltercount($imageUrls) >= 2and the meta ruleonly_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 providesmain_image_urlfor every site, so storing it directly removes the problem at its root.Out of scope
thumbnail_image_id/primary_image_urlcolumns (those were dropped previously and are not coming back).world_heritage_site_imagesrules (gallery semantics stay as-is; this is a hero/thumbnail concern).