Jump to content
  • Status: Not a bug

In v5.0.8 and v5.0.9 that I've so far been using, SVG thumbnails are not displaying in the thumbnail preview in the AdminCP > Themes > Theme Resources page.

Example in the following screenshot, of the 19x SVG images I uploaded, only 3 actually show a generated thumbnail...

image.png

I looked in the browser dev tools and the images that have no thumbnail have image dimensions of 0w x 0h, whereas the functioning thumbnails have dimensions like 520w x 840h (so technically not thumbnail images but resized by CSS). It can be difficult to tell them apart when they have similar filenames cat1, cat 2 etc

The actual image resources themselves display correctly on the front-end and this doesn't happen with webp, jpg etc

So I assume when uploading the actual SVGs, the thumbnails are somehow not always being properly created. These images are displayed correctly in IPS4's Theme Resources, although they were often very large you could always see them.

User Feedback

Recommended Comments

Esther E.

Invision Community Team

For the few SVGs that are working correctly, do you know where/how they were uploaded?

The Old Man

Clients

Hi, yes I uploaded them all together in one batch of SVG images.

Esther E.

Invision Community Team

I'm not sure this is a bug. SVGs are not in the list of "safe" file extensions, therefore it's not always recognized as an image unless we explicitly set it to be safe for that specific area.

For example, when you upload an SVG through the theme editor, that's allowed and it's treated as safe.

If the file is not recognized as an image, there won't be a thumbnail generated for it.

The Old Man

Clients

I'm not sure why some SVGs get a thumbnail and some don't though, but thanks for looking into this.

Presumably they are being checked and sanitised at a basic level in the area of IC5 the same as when uploading them where you mentioned in the theme editor, so perhaps it could be added to the list of allowed areas?