0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
astro/.changeset/seven-singers-mate.md
2021-08-18 09:21:45 -07:00

589 B

astro
minor

Adds support for Astro.resolve

Astro.resolve() helps with creating URLs relative to the current Astro file, allowing you to reference files within your src/ folder.

Astro does not resolve relative links within HTML, such as images:

<img src="../images/penguin.png" />

The above will be sent to the browser as-is and the browser will resolve it relative to the current page. If you want it to be resolved relative to the .astro file you are working in, use Astro.resolve:

<img src={Astro.resolve('../images/penguin.png')} />