1.0.3 • Published 3 years ago

storyblok-next-image v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Storyblok next image

A simple wrapper around next/image which use the same props but change the loader to a custom loader for storyblok

How to use

Import the package

import StoryblokImage from 'storyblok-next-image'

Then use is like a normal next/image

  <Image
    src={src}
    alt={alt}
    width={400}
    height={400}
  />

As this package is just a wrapper around next/image where only the loader functions is changed does all of the normal props for Next/image work EXCEPT loader. For more information of props and how to use next/image: https://nextjs.org/docs/api-reference/next/image#required-props

This npm package also exports the loader function via

import {StoryBlokImageLoader} from 'storyblok-next-image'