mernmail-website/sanity/lib/image.js

11 lines
277 B
JavaScript
Raw Permalink Normal View History

2024-11-08 09:43:04 +01:00
import createImageUrlBuilder from "@sanity/image-url";
import { dataset, projectId } from "../env";
// https://www.sanity.io/docs/image-url
const builder = createImageUrlBuilder({ projectId, dataset });
export const urlFor = (source) => {
return builder.image(source);
};