payload icon indicating copy to clipboard operation
payload copied to clipboard

UploadFeature thumbnail problem in @payload/richtext-lexical when not using image files

Open galcsikgyozo opened this issue 1 year ago • 2 comments

Link to reproduction

No response

Payload Version

3.0.0-beta.53

Node Version

20.9.0

Next.js Version

15.0.0-rc.0

Describe the Bug

Using the UploadFeature in @payload/richtext-lexical, anything that is not an image is still included in an <img> tag instead of using a fallback thumbnail like on the List View of the Media collection.

<img alt="video-example.mp4" data-lexical-upload-id="X" data-lexical-upload-relation-to="media" src="/api/media/file/video-example.mp4">
Screenshot 2024-06-20 at 10 29 24

Reproduction Steps

UploadFeature passed to the lexicalEditor. Trying to upload a file which is not an image.

Adapters and Plugins

richtext-lexical, UploadFeature

galcsikgyozo avatar Jun 20 '24 08:06 galcsikgyozo

This issue has been marked as stale due to lack of activity.

To keep this issue open, please indicate that it is still relevant in a comment below.

github-actions[bot] avatar Dec 13 '24 05:12 github-actions[bot]

I also stumbled across this issue and found this comment: https://github.com/payloadcms/payload/blob/f5516b96dabb3080c648a2356f5f0b7a6bbe2ffa/packages/richtext-lexical/src/features/upload/client/component/index.tsx#L210

Would you accept a PR fixing this?

jhuenges avatar Dec 14 '24 15:12 jhuenges

Would you accept a PR fixing this?

Sorry for the delay in responding, @jhuenges. Yes, that would be great. Are you still available to do it?

GermanJablo avatar May 19 '25 21:05 GermanJablo

Sure, I just need to find the time. I guess I will need a week or so

jhuenges avatar May 20 '25 05:05 jhuenges

🚀 This is included in version v3.53.0

github-actions[bot] avatar Aug 21 '25 18:08 github-actions[bot]

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Aug 29 '25 05:08 github-actions[bot]