- 0.5.0: Photo pages now show the photo full width with no space above it: the block is full width, the template drops its top padding and the photo can be as tall as the screen, so a landscape photo runs edge to edge and a portrait one fills the height. The caption, Previous and Next and the links underneath stay inset to the content edges (set with the –lh-image-gallery-gutter CSS custom property, 5% by default). The #photo anchor now lands with the photo at the very top; –lh-image-gallery-scroll-margin, now 0 by default, can leave room for a sticky header.
- 0.4.0: Links to photo pages now jump straight to the photo. Gallery links, Previous and Next, the prerendered next page and redirects from old lh-image-url pages all end in #photo, the id of the photo block, so the page opens on the photo instead of the site header (most noticeable on phones). Canonical, Open Graph and structured data URLs stay without it. The fragment is filterable with lh_image_gallery_return_anchor, and themes with a sticky header can keep it clear of the photo with the –lh-image-gallery-scroll-margin CSS custom property.
- 0.3.1: Photo pages no longer show the post title as a visible heading. The page heading is now the photo’s own label (its caption, alt text or “Photo n of N”), kept for screen readers and search engines but hidden on screen, and a link back to the post sits under the photo.
- 0.3.0: Photo pages now own their whole set of sharing tags: the caption as the meta description, Open Graph (now with og:site_name) and Twitter card tags pointing at the photo. They tell LH SEO Meta Tags (1.28.0+) through its lh_seo_meta_tags_is_page_meta_owned_elsewhere filter, so the post’s own description, Open Graph and Twitter tags are no longer printed alongside. An ID that is not in a gallery on the post is left to WordPress’s 404 guess, which sends it on to the post.
- 0.2.0: First working release. Every linked photo in a core Gallery block gets its own page at /{post}/photo/{id}/, rendered by a plugin-registered block template in any block theme (classic themes get a content fallback). Gallery links point at these pages instead of carrying ID lists, so each post has one URL per photo and anything else is a 404. Pages are self-canonical with Open Graph and ImageObject data, noindex unless the photo has a caption or alt text, and preload and prerender the next photo; arrow keys and swipes follow the links, no Ajax. Old lh-image-url gallery and single URLs 301 to the new pages or the image file.
- 0.1.0: Initial scaffold.
Changelog
If you like this plugin please consider making a donation to further development

