0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
The web framework for content-driven websites. ️ Star to support our work!
Find a file
Tony Sullivan e8593e7ead
Adds an @astrojs/image integration for optimizing images (#3694)
* initial commit

* WIP: starting to define interfaces for images and transformers

* WIP: basic sharp service to test out the API setup

* adding a few tests for sharp.toImageSrc

* Adding tests for sharp.parseImageSrc

* hooking up basic SSR support

* updating image services to return width/height

* simplifying config setup for v1

* hooking up basic SSR + SSG support (dev & build)

* refactor: a bit of code cleanup and commenting

* WIP: migrating local files to ESM + vite plugin

* WIP: starting to hook up user-provided loaderEntryPoints

* chore: update lock file

* chore: update merged lockfile

* refactor: code cleanup and type docs

* pulling over the README template for first-party integrations

* moving metadata out to the loader

* updating the test for the refactored import

* revert: remove unrelated webapi formatting

* revert: remove unrelated change

* fixing up the existing sharp tests

* fix: vite plugin wasn't dynamically loading the image service properly

* refactor: minor API renaming, removing last hard-coded use of sharp loader

* don't manipulate src for hosted image services

* Adding support for automatically calculating dimensions by aspect ratio, if needed

* a few bug fixes + renaming the aspect ratio search param to "ar"

* Adding ETag support, removing need for loaders to parse file metadata

* using the battle tested `etag` package

* Adding support for dynamically calculating partial sizes

* refactor: moving to the packages/integrations dir, Astro Labs TBD later

* refactor: renaming parse/serialize functions

* Adding tests for SSG image optimizations

* refactor: clean up outdated names related to ImageProps

* nit: reusing cached SSG filename

* chore: update pnpm lock file

* handling file URLs when resolving local image imports

* updating image file resolution to use file URLs

* increasing test timeout for image build tests

* fixing eslint error in sharp test

* adding slash for windows compat in src URLs

* chore: update lockfile after merge

* Adding README content

* adding a readme call to action for configuration options

* review: A few of the quick updates from the PR review

* hack: adds a one-off check to allow query params for the _image route

* Adds support for src={import("...")}, and named component exports

* adding SSR tests

* nit: adding a bit more comments

* limiting the query params in SSG dev to the images integration
2022-07-01 15:47:48 +00:00
.changeset [ci] release (#3783) 2022-07-01 03:09:17 +00:00
.github CI: Prefer per-job cache rather than artifact I/O (#3781) 2022-06-30 16:26:37 -05:00
.gitpod
.vscode update prettier width (#2968) 2022-04-02 14:15:41 -06:00
assets new readme (#3237) 2022-05-03 17:06:04 -07:00
examples [ci] release (#3783) 2022-07-01 03:09:17 +00:00
packages Adds an @astrojs/image integration for optimizing images (#3694) 2022-07-01 15:47:48 +00:00
patches fix our weird beta release issues (#3031) 2022-04-10 18:17:39 -07:00
scripts [ci] release (#3759) 2022-06-29 17:11:48 -05:00
.editorconfig
.eslintignore Enables eslint on the full repo and adds a rule for no only() tests (#3659) 2022-06-22 15:59:49 +00:00
.eslintrc.cjs [ci] format 2022-06-22 16:01:42 +00:00
.git-blame-ignore-revs add big reformat to git-blame-ignore-revs 2022-04-02 14:16:31 -06:00
.gitignore Inline hydration directive scripts (#3605) 2022-06-16 09:54:09 -04:00
.gitmodules
.gitpod.Dockerfile Fix/deno gitpod (#3213) 2022-05-03 10:56:16 -04:00
.gitpod.yml
.npmrc
.nvmrc
.prettierignore refactor(vercel): Build Output API v3 (#3216) 2022-05-11 15:10:38 -06:00
.prettierrc.json update prettier width (#2968) 2022-04-02 14:15:41 -06:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Adding E2E testing with Playwright (#3349) 2022-05-15 21:47:28 +00:00
FUNDING.md
FUNDING.yml
GOVERNANCE.md small change to a nomination message template (#3653) 2022-06-20 15:17:55 -07:00
LICENSE add vite to license 2022-04-24 16:42:39 -07:00
package.json CI: Prefer per-job cache rather than artifact I/O (#3781) 2022-06-30 16:26:37 -05:00
pnpm-lock.yaml Adds an @astrojs/image integration for optimizing images (#3694) 2022-07-01 15:47:48 +00:00
pnpm-workspace.yaml
README.md Added Cloudflare adapter to README.md (#3773) 2022-06-30 08:07:39 -05:00
STYLE_GUIDE.md
tsconfig.base.json
turbo.json CI: Prefer per-job cache rather than artifact I/O (#3781) 2022-06-30 16:26:37 -05:00

Astro logo

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

Install

# Recommended!
npm create astro@latest

# Manual:
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 offical 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/deno astro version
@astrojs/netlify astro version
@astrojs/vercel astro version
@astrojs/cloudflare astro version
@astrojs/partytown astro version
@astrojs/sitemap astro version
@astrojs/tailwind astro version
@astrojs/turbolinks astro version

Several official projects are maintained outside of this repo:

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

Sponsors

Astro is generously supported by Netlify, Vercel, and several other amazing organizations.

❤️ Sponsor Astro! ❤️

Platinum Sponsors

NetlifyNetlify VercelVercel

Gold Sponsors

‹div›RIOTS ‹div›RIOTS StackUp Digital StackUp Digital

Sponsors

SentryQoddi App Platform