Skip to content

(feat) Img component - #39214

Open
hestonhoffman wants to merge 4 commits into
jen.gilbert/astro-basefrom
heston/feat-img-component
Open

(feat) Img component#39214
hestonhoffman wants to merge 4 commits into
jen.gilbert/astro-basefrom
heston/feat-img-component

Conversation

@hestonhoffman

@hestonhoffman hestonhoffman commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Adds Img component with support for images and videos.

  • ImgVideo is a child of Img
  • Images use CDN links instead of loading from repo. Local dev + staging use the staging URL. Prod uses prod.
  • Added a lightbox to replicate behavior on Hugo.
  • Added a plaintext twin that renders an img tag with the prod src, caption, and alt text. For inline images, it drops the tag. I decided to just grab the prod source for the image here instead of rendering the path for each environment. I don't think we gain much from rendering the local path in local etc.
  • I removed image properties that appear to be dead in Hugo (href, target, wide, img_param, pop_param, figure_class, and figure_style).
  • I replaced the style prop with widthPercent and added a validation error that prevents writers from using widthPercent with height/width.

🟢 All tests pass
🟢 You can preview this using preview or dev now, since they use the same URL.

@hestonhoffman
hestonhoffman changed the base branch from master to jen.gilbert/astro-base August 14, 2026 23:39
@hestonhoffman hestonhoffman added the WORK IN PROGRESS No review needed, it's a wip ;) label Aug 14, 2026
@datadog-prod-us1-3

This comment has been minimized.

@hestonhoffman hestonhoffman changed the title Heston/feat img component (feat) Img component Aug 17, 2026
@hestonhoffman
hestonhoffman marked this pull request as ready for review August 17, 2026 18:00
@hestonhoffman
hestonhoffman requested a review from a team as a code owner August 17, 2026 18:00
@hestonhoffman hestonhoffman removed the WORK IN PROGRESS No review needed, it's a wip ;) label Aug 17, 2026
@estherk15 estherk15 self-assigned this Aug 17, 2026
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.

2 participants