Don't use thumbnails for SVG files

This commit is contained in:
Alexander Rosenberg 2024-10-29 05:37:24 -07:00
parent 1adcef08ca
commit a187afd6c7
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -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";
}