Skip to content

Add Astro runtime image provider support #42

Description

@stefashkaa

Feature Title

Add Astro runtime image provider support

Description

Add an Astro provider that targets a compatible deployed runtime image service endpoint.

Use Case

An application using the package alongside an Astro deployment needs responsive URLs for its existing runtime optimizer and resolved image sources.

Proposed Solution

  • Add and export astro through the core provider registry so Angular, React, and Svelte can use the shared configuration.
  • Make the endpoint configurable with the standard /_image path as the documented default for the supported Astro profile.
  • Map the compatible runtime contract, including href, w, h, f, q, and verified fit controls, using resolved source URLs.
  • State the supported Astro version and service assumptions. A runtime endpoint must exist; static exports and imported build-time image metadata require their own integration and are outside this URL adapter’s initial scope.
  • Add setup documentation and focused fixtures covering endpoint overrides, encoded href values, supported modifiers, and fixtures for the declared Astro version. Validate advertised dimensions and content types against an enabled service or controlled server where applicable.

Alternatives Considered

Use Astro’s own image components, prepare service URLs before rendering, or configure a custom provider. The adapter would support the shared components where the runtime endpoint is available.

Examples from Other Libraries

Unpic has an Astro URL provider. The research also references Astro’s version 5 image service API, so version compatibility needs to be explicit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions