]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/attachmentlistitem.php
UseFileAsThumbnailException (helps support GIFs)
[quix0rs-gnu-social.git] / lib / attachmentlistitem.php
index 1af89ef7b7503dec062661bc1fb88ccb479b9270..320218b1a307b9cbd5c14af3e6f04cf5ec16ef34 100644 (file)
@@ -115,6 +115,8 @@ class AttachmentListItem extends Widget
                     try {
                         $thumb = $this->attachment->getThumbnail();
                         $this->out->element('img', array('src' => $thumb->getUrl(), 'alt' => ''));
+                    } catch (UseFileAsThumbnailException $e) {
+                        $this->out->element('img', array('src' => $e->file->getUrl(), 'alt' => $e->file->title));
                     } catch (UnsupportedMediaException $e) {
                         // FIXME: Show a good representation of unsupported/unshowable images
                     }