UploadFeature thumbnail problem in @payload/richtext-lexical when not using image files
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">
Reproduction Steps
UploadFeature passed to the lexicalEditor. Trying to upload a file which is not an image.
Adapters and Plugins
richtext-lexical, UploadFeature
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.
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?
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?
Sure, I just need to find the time. I guess I will need a week or so
🚀 This is included in version v3.53.0
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.