mernmail-website/sanity/lib/image.js

10 lines
277 B
JavaScript

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);
};