🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

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

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

A comprehensive [Contentful](https://www.contentful.com/developers/docs/references/images-api) image loader for the [Next.js Image component](https://nextjs.org/docs/api-reference/next/image).

1.0.4
latest
Source
npm
Version published
Weekly downloads
12K
-15.75%
Maintainers
3
Weekly downloads
 
Created
Source

@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

Keywords

nextjs

FAQs

Package last updated on 26 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts