You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.

The text was updated successfully, but these errors were encountered: