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

Support previewing asset types other than video and images #71

Open
sarmeyer opened this issue Feb 20, 2024 · 1 comment
Open

Support previewing asset types other than video and images #71

sarmeyer opened this issue Feb 20, 2024 · 1 comment

Comments

@sarmeyer
Copy link

sarmeyer commented Feb 20, 2024

Is your feature request related to a problem? Please describe.
There's currently no way to preview an asset type that isn't a video or image. This has come up when adding raw asset types. They aren't caught by the first condition in src/components/AssetPreview.tsx and so a preview is attempted with an img tag, but there are other resource_types available that won't preview properly with the default return value

image
(this particular asset is .doc type, but this happens with other formats like pdfs)

Describe the solution you'd like
Add another condition to render resource types other than images or videos, or allow the consumer to define their own preview config

Describe alternatives you've considered
I'm considering recreating the cloudinary asset schema type for the instances where files or other raw assets types are often used, so that we can define our own preview config, but this is not an ideal solution

@dubhue
Copy link

dubhue commented Mar 4, 2024

It would be nice to be able to pass in/use a customized AssetPreview component that had access to the Cloudinary schema, so one could customize the preview with either text or perhaps a transformed version of the asset if it is a convertible but not tag supported image type.

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

No branches or pull requests

2 participants