We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e49e1131 authored by mattl's avatar mattl

Ugly hack to show thumbnails of otherwise unrepresentable attachments

such as text/html, where the thumbnail has been retrieved via oEmbed/OpenGraph
parent 36587744
......@@ -129,6 +129,12 @@ class AttachmentListItem extends Widget
if ($this->attachment->mimetype === 'application/ogg') {
$mediatype = 'video'; // because this element can handle Ogg/Vorbis etc. on its own
// Ugly hack to show text/html links which have a thumbnail (such as from oEmbed/OpenGraph image URLs)
if (!in_array($mediatype, ['image','audio','video']) && $thumb instanceof File_thumbnail) {
$mediatype = 'image';
switch ($mediatype) {
// Anything we understand as an image, if we need special treatment, do it in StartShowAttachmentRepresentation
case 'image':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment