diff --git a/root/view.php b/root/view.php index b351ab8..32ae9e7 100644 --- a/root/view.php +++ b/root/view.php @@ -465,6 +465,8 @@ var ds; if (full_size) { ds = 'albums/' + ie.getAttribute('data-src'); + } else if (sidebar.children[image].getAttribute('data-type').startsWith('image/svg')) { + ds = 'albums/' + ie.getAttribute('data-src'); } else { ds = 'thumbnails/large/' + ie.getAttribute('data-src'); } @@ -500,8 +502,12 @@ if (me.getAttribute('data-audiotype') !== null) { // Audio does not require work } else if (me instanceof HTMLImageElement) { - // Image - me.src = 'thumbnails/small/' + me.getAttribute('data-src'); + // Image, SVG files don't have thumbnails + if (elem.getAttribute('data-type').startsWith('image/svg')) { + me.src = 'albums/' + me.getAttribute('data-src'); + } else { + me.src = 'thumbnails/small/' + me.getAttribute('data-src'); + } } me.style.display = "initial"; }