Skip to content

Commit

Permalink
add alt to common props
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisweb committed Oct 10, 2024
1 parent 87d4fa2 commit 8628e31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/base/image/AnimatedEmoji.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ const ImageAnimatedEmoji: React.FC<IAnimatedEmojiProps> = (props): JSX.Element =
// however if you add unoptimized it will set the cache-control header of the image to "no-store, must-revalidate"
// after we comment the unoptimized option out, the cache-control is "public, max-age=315360000, immutable"
const common = {
alt: '',
alt: props.alt,
//unoptimized: true,
width: 48,
height: 48,
quality: 100,
}

const {
props: { src: gifSourceSrc, alt: gifAlt, ...rest },
props: { src: gifSourceSrc, ...rest },
} = getImageProps({
...common,
placeholder: 'blur',
Expand All @@ -45,7 +45,8 @@ const ImageAnimatedEmoji: React.FC<IAnimatedEmojiProps> = (props): JSX.Element =
<>
<picture>
<source srcSet={webpSource} type="image/webp" />
<Image src={gifSource} alt={gifAlt} {...rest} className="animatedEmoji" />
{/* eslint-disable-next-line jsx-a11y/alt-text */}
<Image src={gifSource} {...rest} className="animatedEmoji" />
</picture>
</>
)
Expand Down

0 comments on commit 8628e31

Please sign in to comment.