Releases: delicious-simplicity/next-image-imgix-loader
Releases · delicious-simplicity/next-image-imgix-loader
@delicious-simplicity/next-image-imgix-loader@v1.1.1
What's Changed
- Typo fixed from
SharedImigixAndSourceProps
=>SharedImgixAndSourceProps
v1.1.0
New
Added an option for transforming urls from Shopify's CDN:
imgixLoader(props, { fit: "crop", ar: "1:1" }, { shopify: true });
Breaking
Previously the third argument for imgixLoader
was more options for Imgix to build the url. However, we didn't use this internally, nor did the options offer any different results when building the Imgix url. So it was changed in favor of providing custom options like the new one for Shopify.
v1
Features
- Allows for native imgix image params/options
- Similar error boundaries as
next/image
- Uses native
buildUrl
fromreact-imgix
Usage
import Image from "next/image";
import { imgixLoader } from "@delicious-simplicity/next-image-imgix-loader";
const Component = ({ image }) => {
return (
<>
<Image
loader={(props) => imgixLoader(props, { fit: "crop", ar: "1:1" })}
src={image.url}
alt={image.title}
width={image.width}
height={image.height}
/>
</>
);
};
Full Changelog: https://github.com/delicious-simplicity/next-image-imgix-loader/commits/@delicious-simplicity/next-image-imgix-loader@v1.0.1