Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: MediaCard fallback mechanism for broken thumbnails #334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anmolgupta2015
Copy link

Description

This PR fixes [Issue #333] by improving the fallback mechanism in the MediaCard component when thumbnails fail to load.

🔹 What was the issue?

  • If the thumbnailUrl failed to load, the UI displayed a broken image.

🔹 Fix Implemented:

  • Now, when the thumbnail fails, it automatically falls back to the main image (item.url).
  • Improved error handling to prevent UI glitches.

Changes Made

  • Updated MediaCard.tsx:
    ✅ Implemented a thumbnail fallback strategy.
    ✅ Improved error handling for media loading.

How to Test?

  1. Run the frontend locally.

  2. Verify that the main image is displayed as a fallback instead of a broken thumbnail.

  3. Ensure videos and images load correctly in other scenarios.

Screenshots (If Applicable)

### Before
WhatsApp Image 2025-02-16 at 08 36 43_eca55646

### After
WhatsApp Image 2025-02-16 at 08 38 00_9ca67ea1

Linked Issues

Closes [#333]

Checklist

✅ Code follows project guidelines.
✅ No breaking changes.
✅ Tested across different scenarios.

@anmolgupta2015
Copy link
Author

Hii @Pranav0-0Aggarwal Sir,
Kindly see if my code is good to go...waiting for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant