0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
The web framework for content-driven websites. ️ Star to support our work!
Find a file
Oliver Speir 91f75afbc6
Add inferSize to getImage so width and height are optional for remote images (#9976)
* add remote image dimension probing, and param for getImage options, and new astro error

* add inferSize parameter to getImage, which probes remote image size, and respective types to picture and image component

* add fixture and tests

* add changeset

* attempt to fix pnpm-lock.yaml

* fix pnpm-lock.yaml again

* pnpm-lock spacing

* fix pnpm-lock AGAIN

* better description of error for docgen

* improve failed to probe error message and correct required dimensions error

* increase timeout for mdx tests

* increasing mdx timeout to 2min to see if it passes, will reduce if it does

* setting mdx timeout to 70 seconds

* Update packages/astro/src/assets/services/service.ts

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

* refactor to move logic to getImage instead of validateOptions and  to not add a third type to image and picture

* fix broken link created by docs PR

* remove the probe-image-size library due to its use of node APIs

* undo all changes to service.ts that were left  after moving inferSize logic to getImage

* update error message

* remove probe-image-size library all together, update error message, add vendored version of complete image-size library instead of refactored version

* Update .changeset/tame-cameras-change.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/tame-cameras-change.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* reword the error message based on Sarah's previous review

* remove probe-image-size from pnpmlock

* fix lockfile?

* update error message name

* move image-size into vendor folder

* add eslint ignore to a line in image-size

* test if change to mdx test timeout was needed

* Update .changeset/tame-cameras-change.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* update changset syntax

* patch parse heif to account for filetype block being out of order

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-15 10:24:03 +01:00
.changeset Add inferSize to getImage so width and height are optional for remote images (#9976) 2024-02-15 10:24:03 +01:00
.devcontainer Remove examples/vite-plugin-pwa (#9270) 2023-12-01 14:54:11 -06:00
.github feat(audits): Add initial perf audits (#10015) 2024-02-14 14:01:53 +01:00
.gitpod chore: removed adapters cleanup (#8726) 2023-10-10 19:36:35 +05:30
.vscode
benchmark [ci] format 2024-02-14 15:15:02 +00:00
examples [ci] release (#10092) 2024-02-13 14:25:59 -07:00
packages Add inferSize to getImage so width and height are optional for remote images (#9976) 2024-02-15 10:24:03 +01:00
scripts feat(audits): Add initial perf audits (#10015) 2024-02-14 14:01:53 +01:00
.editorconfig
.eslintignore feat: remove webapi in favor of a smaller polyfill (#7840) 2023-08-08 11:01:45 +01:00
.eslintrc.cjs Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
.git-blame-ignore-revs
.gitignore feat(audits): Add initial perf audits (#10015) 2024-02-14 14:01:53 +01:00
.gitpod.yml chore: removed adapters cleanup (#8726) 2023-10-10 19:36:35 +05:30
.npmrc Handle compiler breaking change (#5803) 2023-01-12 22:46:56 +08:00
.nvmrc Remove support for Node 16 (#7780) 2023-08-08 11:01:33 +01:00
.prettierignore Update Prettier (#8420) 2023-09-06 10:23:44 -05:00
CONTRIBUTING.md Use node:test and node:assert/strict (#9649) 2024-01-12 15:53:00 +08:00
LICENSE Implement new a11y audits for the Dev Toolbar app (#9170) 2023-12-04 11:16:27 -06:00
package.json Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
pnpm-lock.yaml Add inferSize to getImage so width and height are optional for remote images (#9976) 2024-02-15 10:24:03 +01:00
pnpm-workspace.yaml Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00
prettier.config.js Update Prettier (#8420) 2023-09-06 10:23:44 -05:00
README.md Compress banner image (#9493) 2023-12-22 16:48:12 +00:00
SECURITY.md [ci] format 2022-08-08 17:12:48 +00:00
SECURITY_CONTACTS Changes required for a Passing grade from OpenSSF Best Practices (#3718) 2022-08-08 12:11:00 -05:00
STYLE_GUIDE.md
tsconfig.base.json feat(assets): Delete original assets unused outside of the optimization pipeline (#8954) 2023-11-08 10:23:23 +01:00
tsconfig.eslint.json feat: use typescript-eslint@v6's reworked configs (#7425) 2023-07-03 20:59:43 +08:00
tsconfig.json chore: add empty tsconfig to prevent TypeScript from crawling (#4937) 2022-09-30 16:02:39 -05:00
turbo.json test: add setup for Vercel / Netlify tests (#7716) 2023-07-21 21:24:36 +02:00

Build the web you want


Astro is a website build tool for the modern web —
powerful developer experience meets lightweight output.

Build Status License npm version

Install

The recommended way to install the latest version of Astro is by running the command below:

npm create astro@latest

You can also install Astro manually by running this command instead:

npm install --save-dev astro

Looking for help? Start with our Getting Started guide.

Looking for quick examples? Open a starter project right in your browser.

Documentation

Visit our official documentation.

Support

Having trouble? Get help in the official Astro Discord.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!

Directory

Package Release Notes
astro astro version
create-astro create-astro version
@astrojs/react astro version
@astrojs/preact astro version
@astrojs/solid-js astro version
@astrojs/svelte astro version
@astrojs/vue astro version
@astrojs/lit astro version
@astrojs/node astro version
@astrojs/vercel astro version
@astrojs/cloudflare astro version
@astrojs/partytown astro version
@astrojs/sitemap astro version
@astrojs/tailwind astro version
@astrojs/alpinejs astro version
@astrojs/mdx astro version

CII Best Practices

Several official projects are maintained outside of this repo:

Project Repository
@astrojs/compiler withastro/compiler
Astro Language Tools withastro/language-tools

Sponsors

Astro is free, open source software made possible by these wonderful sponsors.

❤️ Sponsor Astro! ❤️

Astro's sponsors.