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

Automatically convert files to generate thumbnails in Asset Admin if there's an available converter #1453

Open
GuySartorelli opened this issue Apr 9, 2024 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Apr 9, 2024

This is a follow-on card from silverstripe/silverstripe-assets#489 which added an API for file converters.

For any file which has a valid file converter to convert the original file to an image, the file should be automatically converted and a thumbnail should be generated for use in Asset Admin (and maybe upload fields).

Acceptance Criteria

  • If there is a valid file converter available, a thumbnail should be generated for all non-image files in asset admin.
  • The current icon is still used if there is no valid file converter available
  • No conversion is performed for files which are already images
  • If a thumbnail was already generated previously, we skip all conversion logic and just use the thumbnail directly

Things we need to decide

  • What file format should the thumbnail be?
    • Do we want an array of formats to try? Note that we'd need to loop through them and check each converter to see if they can convert to it (which is fine if there's only a few converters)
  • Do we want to apply this to UploadField as well?
  • Do we want to apply this as a blanket thing that happens for all uses of ThumbnailGenerator?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant