Skip to content

Add ImageOptim API image provider support #41

Description

@stefashkaa

Feature Title

Add ImageOptim API image provider support

Description

Add an ImageOptim API provider for its account-scoped GET URLs, including categorical quality and documented sizing options.

Use Case

An application using ImageOptim API needs responsive image variants without manually assembling account paths and dimension options.

Proposed Solution

  • Add and export imageoptim through the core provider registry so Angular, React, and Svelte can use the shared configuration.
  • Configure the account and endpoint, and serialize https://img.gs/{account}/{dimensions-and-options}/{source-url} using documented fit and crop controls.
  • Expose native quality categories, such as quality=low, as provider-specific options. Avoid implying an exact conversion from core’s numeric quality when the API does not establish one.
  • Apply pixel density once, accounting for the service’s 2x and 3x options and core’s responsive dimensions. Restrict explicit formats to the documented output set.
  • Add setup documentation and focused fixtures covering fit and crop options, quality categories, single application of density, and embedded source queries. Validate advertised dimensions and content types against an enabled service or controlled server where applicable.

Alternatives Considered

Construct ImageOptim GET URLs directly or use a custom provider. A shared adapter would handle account configuration, density, and option serialization consistently.

Examples from Other Libraries

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