@delicious-simplicity/next-image-contentful-loader
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@delicious-simplicity/next-image-contentful-loader

A comprehensive Contentful image loader for the Next.js Image component.

Features

  • Allows for native Contentful image params/options
  • Similar error boundaries as next/image
  • Additional options for managing the aspect ratio of requested images

Usage

import Image from "next/image";
import { contentfulLoader } from "@delicious-simplicity/next-image-contentful-loader";

const Component = ({ image }) => {
  return (
    <>
      <Image
        loader={(props) => contentfulLoader(props, { fit: "crop", ar: "1:1" })}
        src={image.url}
        alt={image.title}
        width={image.width}
        height={image.height}
      />
    </>
  );
};

Required packages

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    1,504
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    1,504
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @delicious-simplicity/next-image-contentful-loader

Weekly Downloads

1,504

Version

1.0.4

License

MIT

Unpacked Size

13.5 kB

Total Files

16

Last publish

Collaborators

  • devjmetivier
  • dsbrianwebster
  • dsmikeyorke