Skip to content

Commit

Permalink
add a imageLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
KW86022 authored and KW86022 committed Oct 24, 2024
1 parent 9e1eb52 commit e45633f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/docs/MigrationImageBehaviour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

import Image from 'next/image'

function imageLoader() {
return undefined
}

function ResponsiveImage({ src, width = 1, height = 1, scaling = 50, alt }) {
return (
<div
Expand All @@ -14,7 +18,7 @@ function ResponsiveImage({ src, width = 1, height = 1, scaling = 50, alt }) {
paddingBottom: `max(350px, ${(width / height) * scaling}%)`,
}}
>
<Image className='next-image' src={src} layout='fill' objectFit='contain' alt={alt} />
<Image loader={imageLoader()} className='next-image' src={src} layout='fill' objectFit='contain' alt={alt} />
</div>
)
}
Expand Down

0 comments on commit e45633f

Please sign in to comment.