[Hugo] Phase 1 · Decision: images layout (page bundles, a shared folder, or hybrid)
Parent: #8297 · Open decision: "Images layout"
Facts
- About 11,200 images: 9,265 SVG, 1,315 WebP, about 600 PNG/JPG/GIF.
src/is 360 MB andstatic/is 157 MB. - The converter copies 9,431 assets that sit next to collection documents, so most collection images are already bundle-local.
- 40 front-matter images point outside the bundle (
../,src/assets/…): blog 9, resources 27, news 4. - Layouts and sections import shared images from
src/assets/images(logos, illustrations, icons). - Hugo only processes raster images. SVGs are copied as-is, so resizing work applies to about 1,900 files.
- Blog posts carry
thumbnailanddarkthumbnail(267 uses), plusthumbnail_svg/darkthumbnail_svg.
Recommendation: hybrid
- Page bundles for anything owned by one document (what the converter already does).
hugo/assets/images/(processed withresources.Get) for shared images used by layouts, with the same sub-paths assrc/assets/imagesso ports are mechanical.hugo/static/for files that must keep an exact URL (static/brand,static/press,static/fonts,llms.txt,CNAME-adjacent files).- Fix the 40 out-of-bundle references by copying the file into the bundle (converter rule) rather than pointing at shared paths.
Tasks
- [ ] Maintainers confirm.
- [ ] Converter: copy out-of-bundle front-matter images into the bundle and rewrite the path (clears the 40 warnings).
- [ ] Document the rule in
CHEATSHEET.md.
Contributor Resources and Handbook
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.
- 📚 See contributing instructions.
- 🎨 Wireframes and designs for Layer5 site in Figma (open invite)
- 🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack.
Join the Layer5 Community by submitting your community member form.
Hi @saurabhraghuvanshii , I would like to work on this issue. Could you please assign it to me?
Hi @saurabhraghuvanshii @PARTH-TUSSLE , I'd like to work on this. While looking into it I found that the converter only checks some of the image fields. Dark-mode thumbnails like darkthumbnail aren't checked, so about 43 more images point outside their page folder and get no warning. I'd fix all of them, add a test and document the rule in the cheatsheet. Could you assign this to me?
Audit Update: Out-of-Bundle Asset Files (37 files)
Following the PR #8460 resolution for imported JSX assets, 37 files across the repository have been verified to reference assets pointing outside the page bundle (to ../../assets/...). These assets publish with broken-relative paths until the image layout decision for #8308 is implemented (e.g. copying out-of-bundle assets into the bundle or using assets/images / resources.Get).
37 Files with Out-of-Bundle Asset References:
blog/2020/2020-03-11-deploying-linkerd-with-meshery/index.mdx(primary owner: #8308)blog/2021/2021-02-04-meet-the-maintainer-michael-gfeller/index.mdx(primary owner: #8453)blog/2021/2021-04-05-meshmate-of-the-year-2020-nikhil-ladha/index.mdx(primary owner: #8308)blog/2021/2021-04-19-announcing-meshery-v0.5/index.mdx(primary owner: #8308)blog/2021/2021-10-01-pipelining-service-mesh-specifications/index.mdx(primary owner: #8308)blog/2021/2021-10-09-an-introduction-to-meshery/index.mdx(primary owner: #8308)blog/2022/2022-05-20-meshmate-of-the-year-2021-aditya-chatterjee/index.mdx(primary owner: #8308)blog/2022/2022-06-07-week-open-source-contributions-with-layer5/index.mdx(primary owner: #8308)blog/2023/05-24-meet-the-meshmate-yash-sharma/index.mdx(primary owner: #8453)blog/2024/02-13-what-is-platform-engineering/index.mdx(primary owner: #8308)blog/2024/02-24-open-container-image-meshery/index.mdx(primary owner: #8308)blog/2024/04-26-docker-compose-with-meshery/index.mdx(primary owner: #8308)blog/2024/07-01-meet-the-maintainer-xin-huang/index.mdx(primary owner: #8453)blog/2024/09-08-meet-the-maintainer-hussaina-begum/index.mdx(primary owner: #8453)blog/2024/09-27-meet-the-maintainer-aisuko-li/index.mdx(primary owner: #8453)blog/2024/10-22-meet-the-maintainer-aadhitya-amarendiran/index.mdx(primary owner: #8453)blog/2024/11-01-meet-the-maintainer-yash-sharma/index.mdx(primary owner: #8453)blog/2024/11-05-what-is-the-kanvas-catalog/index.mdx(primary owner: #8308)blog/2025/05-28-meet-the-maintainer-ian-whitney/index.mdx(primary owner: #8453)blog/2025/08-27-meet-the-maintainer-aabid-sofi/index.mdx(primary owner: #8453)blog/2025/12-28-gemini-cli-trusted-directories/index.mdx(primary owner: #8308)blog/2026/03-02-meshery-hits-10000-github-stars/index.mdx(primary owner: #8308)blog/2026/03-26-meet-the-maintainer-sangram-rath/index.mdx(primary owner: #8453)blog/2026/04-02-open-source-maintenance-ai-contributors/index.mdx(primary owner: #8401)blog/2026/04-03-claude-code-skills-not-found-sessionstart-hook/index.mdx(primary owner: #8308)blog/2026/06-22-meet-the-maintainer-mia-grenell/index.mdx(primary owner: #8453)blog/2026/09-14-disable-claude-code-session-feedback-survey/index.mdx(primary owner: #8308)blog/2026/09-16-ai-system-1-versus-system-2-tasks/index.mdx(primary owner: #8308)blog/blog-template/index.mdx(primary owner: #8308)blog/meetTheMaintainer-template/index.mdx(primary owner: #8453)events/2022/servicemeshcon-EU-2022/index.mdx(primary owner: #8308)handbook/community/index.mdx(primary owner: #8308)handbook/connect-with-us/index.mdx(primary owner: #8308)handbook/projects/index.mdx(primary owner: #8308)handbook/repository-overview/index.mdx(primary owner: #8456)handbook/security-vulnerabilities/index.mdx(primary owner: #8308)resources/case-study/hpes-adoption-of-meshery-and-kanvas/index.mdx(primary owner: #8454)
(Note: In the converter report, 22 of these 37 have #8308 as their primary owner; the other 15 are primarily tracked under bespoke component or missing asset issues #8453, #8454, #8456, and #8401).
Zero-Byte SVG Audit (integrations/)
Following an audit against origin/master, here is the breakdown of the 6 zero-byte SVGs logged during migration:
-
Empty in source repository (
origin/master):src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/components/iam-identity-mapping/icons/color/iam-identity-mapping-color.svg(0 bytes)src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/components/iam-identity-mapping/icons/white/iam-identity-mapping-white.svg(0 bytes)src/collections/integrations/vald/icons/components/vald-mirror-target/icons/white/vald-mirror-target-white.svg(0 bytes)src/collections/integrations/vald/icons/white/vald-white.svg(0 bytes) These 4 files are 0 bytes in the primary upstream source repository (origin/master) and represent source-repo data issues.
-
Non-empty on
origin/master, emptied onhugobranch:src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/color/rustrial-aws-eks-iam-auth-controller-color.svg(2,527 bytes onorigin/master)src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/white/rustrial-aws-eks-iam-auth-controller-white.svg(2,374 bytes onorigin/master) These 2 files contain valid SVGs onorigin/master, but were truncated to 0 bytes on thehugobranch during merge commitdb24f0195df(PR #8291).
Zero-Byte Asset Reconciliation & Upstream Audit
A fresh, comprehensive repository-wide audit (\git ls-tree -r -l) scanning for any 0-byte .svg, .png, .webp, and .pdf\ files across both \origin/master\ and \hugo\ branches resolves the earlier discrepancy:
1. Reconciliation of Earlier 6 Integration Names
An earlier note cited \pache-camel, \ackstage, \luentd, \jenkins, \kyverno, and
ats. That list was conflated with integration component frontmatter/model warnings; none of those files are 0-byte assets on disk. For instance, \ackstage-color.svg\ (4,769 B), \luentd-color.svg\ (5,124 B), and \kyverno-color.svg\ (3,211 B) are fully populated valid SVGs.
2. Exact 0-Byte Asset Files on \origin/master\ (4 files)
The source repository upstream (\origin/master) contains exactly 4 zero-byte SVGs (source repository upstream data issue):
- \src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/components/iam-identity-mapping/icons/color/iam-identity-mapping-color.svg\ (0 bytes)
- \src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/components/iam-identity-mapping/icons/white/iam-identity-mapping-white.svg\ (0 bytes)
- \src/collections/integrations/vald/icons/components/vald-mirror-target/icons/white/vald-mirror-target-white.svg\ (0 bytes)
- \src/collections/integrations/vald/icons/white/vald-white.svg\ (0 bytes)
3. Exact 0-Byte Asset Files on \hugo\ (6 files)
On \hugo, the 4 upstream files above were present plus 2 icons truncated to 0 bytes during merge commit \db24f0195df\ (PR #8291): 5. \src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/color/rustrial-aws-eks-iam-auth-controller-color.svg\ (2,527 bytes on master -> 0 bytes on hugo) 6. \src/collections/integrations/rustrial-aws-eks-iam-auth-controller/icons/white/rustrial-aws-eks-iam-auth-controller-white.svg\ (2,374 bytes on master -> 0 bytes on hugo)
4. Resolution
Pull Request #8473 has been opened against \hugo\ restoring the two truncated rustrial icons from \origin/master. Once merged, \hugo\ matches \origin/master\ exactly with only the 4 source-repo empty assets remaining.
Decision recorded: Option 1 (page bundles only) for #8308.
- Rationale: Keeps every page self-contained for Hugo's
responsive-imagepipeline (WebP/AVIF resizing requires Page Resources), avoids ahugo/assets/mount that breaks--baseURLsubpath previews without template rewrites, and preserves zero URL changes (1006/1006non-Sistent docs). - Measurements (
origin/hugovs#8539prototype):- Out-of-bundle asset warnings:
49files ->0(+31unique assets pulled into bundles,114total bundle copies,+18.0 MBdisk delta,+238 msbuild time delta). - Subpath (
--baseURL https://x.test/hugo-preview/pr-1/) & root checks on the 49 pages:47/49pass (hpes-adoption-of-meshery-and-kanvaspasses once #8542 lands;11-05-what-is-the-kanvas-catalogmissesimport-design-gif.gifin source).
- Out-of-bundle asset warnings:
- PRs: #8539 (Option 1 asset bundling), split out from it: #8542 (
inline-quotes.html./trim), #8543 (own-bundle root-relative<img>rewrite).