This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// custom Next.js component for displaying Strapi images with a custom loader | |
// NEXT_PUBLIC_BACKEND_URL_IMAGES needs to be set in the .env file, e.g.: NEXT_PUBLIC_BACKEND_URL_IMAGES=http://localhost:1337 | |
// For placeholders to work, install strapi-plugin-placeholder | |
'use client'; | |
import { default as NextImage, ImageLoader, ImageProps } from 'next/image'; | |
import _strapiBreakpoints from '/src/data/preBuild/strapiBreakpoints.json'; | |
export interface IStrapiImage { |