block-options icon indicating copy to clipboard operation
block-options copied to clipboard

Feature Request: Show preview image in file block

Open wpfangirl opened this issue 5 years ago • 2 comments

I wrote this up in detail over at https://github.com/WordPress/gutenberg/issues/19077. WordPress can show icons (for other file types) or preview images (for PDFs on sites with Imagick) using wp_get_attachment_image( $attachment_id, $size, $icon, $attr) and it would be great to be able to do this with the file block.

I would envision this as a vertically stacked layout:

Image or Icon Text Link Download Button

And you'd probably want it to have alignment (does it now?) so you could float it next to a block of text or another file. (Ideally I'd like to be able to create a document gallery, but that's presumably outside the scope of enhancing the file block.)

wpfangirl avatar Dec 12 '19 16:12 wpfangirl

@wpfangirl Seems like core devs will be working on this feature. I'm following the discussion and if ever core devs decided to not include this feature then I'll add it on EditorsKit. Thanks a lot!

phpbits avatar Dec 20 '19 07:12 phpbits

I saw that. Thanks so much for being willing to jump in!

wpfangirl avatar Dec 20 '19 16:12 wpfangirl