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

Add thumbnails to images files #6

js-ddev opened this issue Oct 31, 2018 · 1 comment

Add thumbnails to images files #6

js-ddev opened this issue Oct 31, 2018 · 1 comment


Copy link

js-ddev commented Oct 31, 2018

For example in the screenshot below, Friday.jpg and Luf.jpg icons would be a miniature of the image instead of the image filetype icon.

Copy link

mflorea commented Sep 25, 2020

If we want to add a preview for image attachments, like in the Attachment tab on recent versions of XWiki, then we need to increase the size of the icon. A preview using 16px doesn't help much. I would start with 32px, centering the file name vertically. It would make sense to also increase the user avatar to 32px in this case. And while we're at this, it would also be nice to replace the hard-coded Silk icons with dynamic icon theme.

The icon used on the Attachments tab is generated from Velocity using the mimetypeimg macro. We cannot use it as is in the File Manager because most of the File Manager UI is written in JavaScript (Angular). But you can check what the attachment picker does to have the icon in JavaScript.

On the File Manager side, you need to start from FileManagerCode.DriveSheet which has a file Angular directive that controls how files are displayed. You can see there how the Silk icons are hard-coded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants