withastro
astro
BlogDocsChangelog

Fix bare images used in JSON content collections

#14590Merged
Comparing
claude/review-issue-solution-011CUJzVWzjca3soFiVrWxzS
(
08f88ce
) with
main
(
7958c6b
)
CodSpeed Performance Gauge
0%
Untouched
6

Benchmarks

Passed

Rendering: streaming [false], .md file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
+1%
12.9 ms12.8 ms
Rendering: streaming [false], .mdx file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
0%
716.3 ms712.8 ms
Rendering: streaming [true], .astro file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
0%
940.1 ms937.3 ms
Rendering: streaming [true], .mdx file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
0%
724.6 ms723.9 ms
Rendering: streaming [false], .astro file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
0%
887.6 ms888.2 ms
Rendering: streaming [true], .md file
benchmark/bench/codspeed.bench.js::Bench rendering
CodSpeed Performance Gauge
0%
12.8 ms12.8 ms

Commits

Click on a commit to change the comparison range
Base
main
7958c6b
-0.05%
test(content): add test for bare filename images in JSON collections Adds a test case to verify that bare filenames (e.g., "cover.jpg") work correctly in JSON content layer collections with the image() helper, ensuring they are resolved the same way as in markdown frontmatter. The test includes: - New rockets.json fixture with bare filename and relative path images - Test assertions for both bare filename and relative path resolution - Updated collections.json.js to include the new collection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
57ef469
1 day ago
by claude
+0.01%
chore: add changeset for image path resolution fix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
0578d87
1 day ago
by claude
+0.28%
fix(content): exclude aliases and parent paths from normalization Updates the bare filename normalization to properly skip: - Alias paths starting with ~ (e.g., ~/assets/image.jpg) - Alias paths starting with @ (e.g., @images/image.jpg) - Parent directory paths starting with ../ (e.g., ../image.jpg) This prevents breaking existing alias resolution while still normalizing true bare filenames like "cover.jpg" to "./cover.jpg". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
08f88ce
1 day ago
by claude
© 2025 CodSpeed Technology
Home Terms Privacy Docs