import { FixedObject, FluidObject } from 'gatsby-image'; import ImgixClient from '@imgix/js-core'; import { IGetImageDataArgs, IGatsbyImageData, GatsbyImageProps } from 'gatsby-plugin-image'; /** * Imgix parameters used in Imgix's URL API. * * @see Imgix Image URL API Reference: {@link https://docs.imgix.com/apis/rendering} */ declare type ImgixParams = Record; /** * Metadata that defines an image. This data is used to resolve Gatsby image objects. */ interface ImageSource extends ImageSourceDimensions { /** * The image's Imgix URL. */ url: string; } /** * Dimensions of an image. This data is used to resolve Gatsby image objects. */ interface ImageSourceDimensions { /** * The width of the image. */ width: number; /** * The height of the image. */ height: number; } declare type ImgixClientConfig = ConstructorParameters[0]; declare type BuildFixedObjectTypeConfig = { includeLibraryParam?: boolean; }; /** * @deprecated `gatsby-image` is deprecated ("fixed" and "fluid" images). Use * `gatsby-plugin-image` instead. You can use the `getGatsbyImageData` * function to build an object like `buildFixedObjectType`. * @see {@link https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/ | Migrating from gatsby-image to gatsby-plugin-image} */ declare const buildFixedImageData: (src: string, imgixParams: ImgixParams & { w: number; h: number; }, options?: BuildFixedObjectTypeConfig) => FixedObject; declare type BuildFluidObjectTypeConfig = { includeLibraryParam?: boolean; sizes?: string; }; /** * @deprecated `gatsby-image` is deprecated ("fixed" and "fluid" images). Use * `gatsby-plugin-image` instead. You can use the `getGatsbyImageData` * function to build an object like `buildFluidObjectType`. * @see {@link https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/ | Migrating from gatsby-image to gatsby-plugin-image} */ declare const buildFluidImageData: (src: string, imgixParams: ImgixParams & { ar: string; }, options?: BuildFluidObjectTypeConfig) => FluidObject; declare type GetGatsbyImageDataConfig = Omit, "baseUrl" | "urlBuilder" | "sourceWidth" | "sourceHeight" | "width" | "aspectRatio" | "pluginName" | "options"> & { src: string; imgixParams?: ImgixParams; } & ({ sourceWidth: number; sourceHeight: number; } | { width: number; aspectRatio: number; }); declare const getGatsbyImageData: (config: GetGatsbyImageDataConfig) => IGatsbyImageData; declare type ImgixGatsbyImageProps = GetGatsbyImageDataConfig & Omit; declare const ImgixGatsbyImage: (props: ImgixGatsbyImageProps) => JSX.Element; export { BuildFixedObjectTypeConfig, BuildFluidObjectTypeConfig, GetGatsbyImageDataConfig, ImageSource, ImageSourceDimensions, ImgixClientConfig, ImgixGatsbyImage, ImgixGatsbyImageProps, ImgixParams, buildFixedImageData, buildFluidImageData, getGatsbyImageData };