Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates

Changelog

Track new features, improvements, and fixes across all Sanity products.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Changelog

Track new features, improvements, and fixes across all Sanity products.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

On this page

Filter by product

Filter by product

Apps
  • 6
  • 1
  • 18
  • 1
  • 6
  • 7
  • 6
  • 14
  • 3
  • 310
  • 2
  • 1
Integrations & Libraries
  • 15
  • 6
  • 2
  • 4
  • 2
  • 2
  • 9
  • 1
  • 1
  • 1
  • 6
  • 9
  • 4
  • 1
  • 3
Subscribe to the changelog
  • RSS (Latest)
  • RSS (Full)
  • JSON Feed (Latest)
  • JSON Feed (Full)
  1. Changelog
  2. Integrations & Libraries
  3. Image URL library

More intuitive exports, better type support, and modernized library

Published: November 27, 2025

v2.0.0

To support upcoming features and to better align with the patterns set by other Sanity libraries, @sanity/image-url now has a more intuitive API surface. The functionality of the library hasn't changed, but the core utilities and types are now named exports and types are easier to discover.

This is a breaking change. Follow the steps below to update to the latest version.

Upgrade steps

Update imports

All public utilities and types are now available from the default export path. No more hunting for types deep in the path.

import { createImageUrlBuilder, type SanityImageSource } from '@sanity/image-url'
import imageUrlBuilder from '@sanity/image-url'
import type { SanityImageSource } from '@sanity/image-url/lib/types/types'

Rename imageUrlBuilder => createImageUrlBuilder

The primary builder API is now named createImageUrlBuilder where it was previously named imageUrlBuilder. Update your code to reflect the change. If you're using the urlFor pattern, you likely only need to do this once.

import React from 'react'
import myConfiguredSanityClient from './sanityClient'
import imageUrlBuilder from '@sanity/image-url'

const builder = imageUrlBuilder(myConfiguredSanityClient)

function urlFor(source) {
  return builder.image(source)
}
import myConfiguredSanityClient from './sanityClient'
import {createImageUrlBuilder} from '@sanity/image-url'

const builder = createImageUrlBuilder(myConfiguredSanityClient)

function urlFor(source) {
  return builder.image(source)
}

Beyond adjusting your imports and updating the builder name, there are no other breaking changes.

Related documentation

  • Presenting Images

Loading...

On this page

  • Upgrade steps
  • Update imports
  • Rename imageUrlBuilder => createImageUrlBuilder

Related documentation

  • Presenting Images

import { createImageUrlBuilder, type SanityImageSource } from '@sanity/image-url'
import imageUrlBuilder from '@sanity/image-url'
import type { SanityImageSource } from '@sanity/image-url/lib/types/types'
import React from 'react'
import myConfiguredSanityClient from './sanityClient'
import imageUrlBuilder from '@sanity/image-url'

const builder = imageUrlBuilder(myConfiguredSanityClient)

function urlFor(source) {
  return builder.image(source)
}
import myConfiguredSanityClient from './sanityClient'
import {createImageUrlBuilder} from '@sanity/image-url'

const builder = createImageUrlBuilder(myConfiguredSanityClient)

function urlFor(source) {
  return builder.image(source)
}

Previous Changelog

Shopify shop domain added to sync

November 4, 2025

Sanity Connect for Shopify

Next Changelog

Sanity MCP Server GA: remote server, schema deployment, and new tools

December 11, 2025

MCP server