Skip to content
Snippets Groups Projects
Commit 38efaaa3 authored by Andy Leuchtturm's avatar Andy Leuchtturm
Browse files

implement imageLoader

parent aff39583
No related branches found
No related tags found
1 merge request!86planning#1203: Standards
Pipeline #56114 failed
......@@ -4,6 +4,10 @@ import useImgPath from 'shared/use-img-path'
const { getImgPath } = useImgPath()
const imageLoader = ({ src, width, quality }) => {
return `${src}?w=${width}&q=${quality || 75}`
}
export default function LifecyclePicture(lifecyclephase:Tag) {
/* beim tag 'status' soll das zugehörige Lebenszyklus-Bild ausgegeben werden */
const imagePath = `/img/standards/lifecycle/${lifecyclephase.value}.svg`
......@@ -11,6 +15,7 @@ export default function LifecyclePicture(lifecyclephase:Tag) {
<div className="border border-gray-300 rounded-lg overflow-hidden py-2">
{/* Die Next.js Image-Komponente verwendet das "src" Attribut */}
<Image
loader={imageLoader}
src={getImgPath(imagePath)}
alt={`Bild für Tag ${lifecyclephase.value}`}
width={500} // Breite des Bildes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment