Skip to content

Releases: imagekit-developer/imagekit-astro

Version 1.0.1

05 May 11:31

Choose a tag to compare

Fixed

  • <Picture /> now emits one URL per format. The image service was discarding the format prop, so every <source> Astro generated for <Picture /> resolved to the same URL — defeating the point of multi-format delivery. The service now appends format to the final transformation chain step as f-<format>, so each <source> correctly requests its own format from ImageKit (f-avif, f-webp, etc.).

Changed

  • format prop on <Image /> is now honored. Previously ignored; now appended to the final transformation chain step as f-<format>. When unset, no f- parameter is emitted so ImageKit's default f-auto negotiation still applies. Note: imported local assets cause Astro to auto-fill format from the file extension — to force f-auto in that case, override via transformation: [{ format: 'auto' }].

Full Changelog: 1.0.0...1.0.1

Version 1.0.0

05 May 10:22

Choose a tag to compare

@imagekit/astro 1.0.0 🎉

First stable release of the official ImageKit SDK for Astro. Drop-in components and an Astro integration for delivering optimized, transformed images and videos through ImageKit, plus server-side helpers for secure uploads.

Highlights

  • Astro integration — register ImageKit once in astro.config.mjs and use the components anywhere, including inside Markdown and MDX.
  • <Image /> component — automatic responsive srcset/sizes, lazy loading, and full ImageKit transformation support (resize, crop, focus, AI transforms, overlays, etc.).
  • <Video /> component — adaptive video delivery with ImageKit transformations.
  • <OgImage /> component — generate Open Graph / social share images on the fly using ImageKit transformations and overlays.
  • Built-in image service — opt-in Astro image service (@imagekit/astro/image-service) so astro:assets and Markdown images route through ImageKit automatically.
  • Server helpers (@imagekit/astro/server) — getUploadAuthParams for issuing secure client-side upload tokens (HMAC-SHA1 signature, server-only, private API key never shipped to the browser).
  • TypeScript-first — full types for components, transformations, and helpers.
  • Wide Astro compatibility — tested against Astro 3, 4, 5, and 6 via end-to-end Playwright tests.
  • Zero runtime config in the browser — URL building is done at render time; the only client dependency is @imagekit/javascript.
  • Provenance-signed npm releases — published with npm publish --provenance for supply-chain transparency.

Installation

npm install @imagekit/astro
# or
pnpm add @imagekit/astro

Quick start

// astro.config.mjs
import { defineConfig } from "astro/config";
import imagekit from "@imagekit/astro/integration";

export default defineConfig({
  integrations: [
    imagekit({
      urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
    }),
  ],
});
---
import { Image } from 'astro:assets';
import { Video } from "@imagekit/astro";
---
<Image src="/sample.jpg" width={800} height={600} alt="Sample" />
<Video src="/sample.mp4" width={1280} height={720} controls />

Compatibility

  • Astro >= 3.2.0
  • Node.js >= 18

Documentation

See the README for full usage, transformation reference, and upload-auth setup.


Full diff: initial release.