Skip to content

Feature: Support dynamic testimonial avatar images on Careers page #1695

Description

@nishtha-agarwal-211

Description

On the Careers page (/careers), the "What Our Team Says" testimonial carousel currently ignores the avatar field defined in the testimonials array and always displays a generic Lucide User icon instead.

Although testimonial objects contain avatar paths such as:

avatar: "/img/testimonial-sarah.jpg"

the UI does not render these images.

Current implementation:

<div className="mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-purple-500 shadow-inner">
  <User className="h-10 w-10 text-white" />
</div>

Additionally, the referenced testimonial image assets are missing from static/img.


Expected Behavior

  • Display contributor avatar images when the avatar field exists
  • Fall back to the default User icon if the image fails to load
  • Ensure valid testimonial image assets are available

Suggested Solution

Update the avatar section in src/pages/careers/index.tsx to conditionally render the contributor image.

Proposed Code

<div className="mx-auto mb-6 h-20 w-20 relative rounded-full bg-gradient-to-br from-blue-400 to-purple-500 shadow-inner overflow-hidden flex items-center justify-center">
  {testimonials[activeTestimonial].avatar ? (
    <img 
      src={testimonials[activeTestimonial].avatar} 
      alt={testimonials[activeTestimonial].name} 
      className="h-full w-full object-cover"
      onError={(e) => {
        // Fallback if image fails to load
        e.currentTarget.style.display = 'none';
      }}
    />
  ) : (
    <User className="h-10 w-10 text-white" />
  )}
</div>

Benefits

  • Improves UI personalization
  • Makes testimonials visually engaging
  • Properly utilizes existing testimonial data
  • Adds graceful fallback handling for missing images

Files to Update

  • src/pages/careers/index.tsx
  • static/img/* (if local avatar assets are added)

Metadata

Metadata

Labels

Type

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions