Wouldn't it be great to show thumbnails of attached images at the edit and view pages? This feature would cover one of the major drawbacks of the Drupal forum. Maybe the code of upload_preview would be useful for this (but upload_preview shows thumbnails only at the edit page at this moment).

Comments

heine’s picture

Upload preview already partially works with comment upload.

heine’s picture

Status: Active » Fixed

Committed one little change to 5.x-dev that enables 'full' Upload preview operation.

heine’s picture

Oh, this was all for thumbnails during upload. You can display images in nodes by overriding theme_upload_attachments (for both normal uploads and comment uploads).

Xabi’s picture

Great! :-)

heine’s picture

I've committed a bit more.

If you select Inline display, all images will be displayed inline. However, no thumbnails yet. If you want more control override the theme function theme_comment_attachments.

Xabi’s picture

I'm trying to do this, but I'm lost... could you point us in any direction to override that function at get the thumbnails thing working? Thank you in advanced.

hectorplus’s picture

So there's an option of displaying images inline, yet, when i upload and image, then view the comment/node, there's no image.
My question is, why there's an option of "Display image inline", yet it does not achieve its purpose. My understanding is that i would have to override the heme_upload_attachments in order to show the images in the comments/nodes?
Thank you.

heine’s picture

Please open new issues.

Note that comment_upload doesn't do anything with uploads attached to nodes.

Anonymous’s picture

Status: Fixed » Closed (fixed)