Skip to content

Conversation

@Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Dec 18, 2025

Changes

So Vite actually exposes a method that allows you to check if a file is authorized or not in its dev server, this is pretty neat however it requires a resolved config because it uses some of the properties. Since the image endpoint runs in the user's code, we can only expose this through a Vite plugin, but it's not the first time we do that, so it's ok.

Testing

Added a few tests

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 90b6a77

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Dec 18, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 18, 2025

CodSpeed Performance Report

Merging #15052 will not alter performance

Comparing fix/images-use-vite-functions (90b6a77) with main (97767c2)

Summary

✅ 6 untouched

@Princesseuh Princesseuh linked an issue Dec 19, 2025 that may be closed by this pull request
1 task
@Princesseuh Princesseuh marked this pull request as ready for review December 19, 2025 01:00
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice tests!

@Princesseuh Princesseuh merged commit b2bcd5a into main Jan 5, 2026
46 of 48 checks passed
@Princesseuh Princesseuh deleted the fix/images-use-vite-functions branch January 5, 2026 11:12
@astrobot-houston astrobot-houston mentioned this pull request Jan 5, 2026
florian-lefebvre added a commit that referenced this pull request Jan 7, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by:  Matthew Phillips <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Erika <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Antony Faris <[email protected]>
Co-authored-by: Erika <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Houston (Bot) <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Volpeon <[email protected]>
Co-authored-by: Martin Trapp <[email protected]>
Co-authored-by: fkatsuhiro <[email protected]>
Co-authored-by: Oliver Speir <[email protected]>
Co-authored-by: Andreas Deininger <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: fabon <[email protected]>
Co-authored-by: Raanelom <[email protected]>
Co-authored-by: Rahul Dogra <[email protected]>
fix(ci): Reinstall deps after having published VS Code (#14996)
fix(svelte): allow client directives (#15004)
fix(assets): Fixes missing format option for svgs in the passthrough service (#14987)
fix(deps): update all non-major dependencies (#15020)
fix(content-layer): Try a smarter solution to normalize bare image paths in JSON (#15028)
fix(astro): assets vite build log (#15034)
resolved (#15033)
fix: Remote images: Prevent internal caching from interfering with Astro's cache (#14954)
fix(deps): update astro adapters (#15084)
fix(deps): update all non-major dependencies (#15072)
fix(deps): update astro client runtimes (#15085)
fix: move ts-plugin node_modules to dist (#15083)
fix: components imports paths (#15107)
fix(assets): Use Vite's isFileLoadingAllowed to check if a file can be loaded (#15052)
fix(vscode): Correctly handle TypeScript blocks ending with types (#15109)
fix(svelte): improve Svelte children prop type checking (#15070)
fix Firefox e2e tests for playwright 1.57 (#15113)
fix(deps): update astro dependencies (#15103)
fix: lint vt test (#15114)
fix(deps): update language tools (#15104)
resolver abstraction (#15111)
fix(vue): add HTML attributes to generated TypeScript types (#15016)
Fixes #14686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images cannot be loaded in dev mode in a port forwarding environment

3 participants