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

BUG: MediaCard Fails to Load Thumbnail but Displays Image on Click #333

Open
2 tasks done
anmolgupta2015 opened this issue Feb 16, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@anmolgupta2015
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Description

The MediaCard component does not display the thumbnail image, even though the full image loads when clicked. This issue occurs because the component marks the media as failed when the thumbnail URL is unavailable, instead of attempting a fallback to the full image.

Steps to Reproduce

  1. Open the application.
  2. Observe that the media shows a "Failed to load media" message.
  3. Click on the media, and the full image appears correctly.

Expected Behavior

  • If the thumbnail fails to load, the component should automatically switch to the full image (item.url) instead of displaying an error.

Actual Behavior

  • The component shows an error state instead of using the full image.
  • Clicking on the media reveals that the full image is available, meaning the failure message is misleading.

Proposed Solution

  • Implement a fallback mechanism:
    • If thumbnailUrl fails, automatically set item.url as the source.
    • Display an error only if both thumbnailUrl and item.url fail.
  • Ensure smooth loading behavior and prevent false "Failed to load media" messages.

Screenshot

### Before

Image

### After

Image

Record

  • I agree to follow this project's Code of Conduct
@mebishnusahu0595
Copy link

Hey. Assign this to me !! I can solve this ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants