Releases: imagekit-developer/imagekit-astro
Releases · imagekit-developer/imagekit-astro
Version 1.0.1
Fixed
<Picture />now emits one URL per format. The image service was discarding theformatprop, so every<source>Astro generated for<Picture />resolved to the same URL — defeating the point of multi-format delivery. The service now appendsformatto the final transformation chain step asf-<format>, so each<source>correctly requests its own format from ImageKit (f-avif,f-webp, etc.).
Changed
formatprop on<Image />is now honored. Previously ignored; now appended to the final transformation chain step asf-<format>. When unset, nof-parameter is emitted so ImageKit's defaultf-autonegotiation still applies. Note: imported local assets cause Astro to auto-fillformatfrom the file extension — to forcef-autoin that case, override viatransformation: [{ format: 'auto' }].
Full Changelog: 1.0.0...1.0.1
Version 1.0.0
@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.mjsand use the components anywhere, including inside Markdown and MDX. <Image />component — automatic responsivesrcset/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) soastro:assetsand Markdown images route through ImageKit automatically. - Server helpers (
@imagekit/astro/server) —getUploadAuthParamsfor 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 --provenancefor supply-chain transparency.
Installation
npm install @imagekit/astro
# or
pnpm add @imagekit/astroQuick 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.