Bug 474463

Summary: Add svgs to supported mimetype
Product: [Applications] gwenview Reporter: david <12davidkac>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: REOPENED ---    
Severity: normal CC: bernie, consus, meven29
Priority: NOR    
Version First Reported In: 23.08.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description david 2023-09-12 21:20:57 UTC
SUMMARY
Please add SVG (image/svg+xml) and SVGZ (image/svg+xml-compressed) to supported mimetypes, since gwenview can open them just fine. Currently kde uses kate to open svgs by default.
Comment 1 Méven Car 2023-09-15 11:48:02 UTC
While gwenview can open SVG, it is not a proper Svg viewer, meaning it supports a minimal set of SVG features, which means for some SVG files, it won't render accurately.

That's the reason why svg support is not advertised.

You can manually associate this file type with gwenview if you want in systemsettings > file association.
Comment 2 david 2023-09-22 16:19:01 UTC
Oh I see. Are there plans to improve svg support or is there another kde program recommended for viewing svgs?
Comment 3 Méven Car 2023-09-23 07:45:00 UTC
> Oh I see. Are there plans to improve svg support or is there another kde program recommended for viewing svgs?

Unfortunately not really, all Qt and KDE use Qt for svg rendering that has limitations and currently only browsers and inkscape (and other specialized) can properly render svg and no library can provide the same support except embedding a browser which defeats the purpose of an image viewer.

This is not even specific to KDE, Gnome has the same kind of limitations with rsvg.
Comment 4 david 2023-09-23 21:55:58 UTC
Since both Koko and Konqueror open them by default it would probably be fine for gwenview to do so as well. It bugs me because it's not very user friendly, from a new user's perspective you see an image in the file manager and when you open it there's just text, not exactly what you'd expect. I hope this gets fixed soon.
Comment 5 Bernie Innocenti 2024-06-27 22:39:49 UTC
I just tried opening SVGs in Koko, and it's no better than Gwenview: it gets rendered to a bitmap, and zooming results in upscaling.

Currently (Plasma 6.1.1), when clicking on an SVG image, I get a read-only XML dump in Okular. I came here thinking it was a bug that should be reported.

Thus, I'm reopening this bug to request re-evaluating last year's decision. While non-ideal, I feel that associating "image/xml+svg" with Gwenview leads to a less surprising and more desirable result for a user wanting to "see" an SVG image.
Comment 6 Méven Car 2024-07-22 12:39:33 UTC
(In reply to Bernie Innocenti from comment #5)
> I just tried opening SVGs in Koko, and it's no better than Gwenview: it gets
> rendered to a bitmap, and zooming results in upscaling.
> 
> Currently (Plasma 6.1.1), when clicking on an SVG image, I get a read-only
> XML dump in Okular. I came here thinking it was a bug that should be
> reported.
> 
> Thus, I'm reopening this bug to request re-evaluating last year's decision.

You offered no new argument or perspective.

That being said there is some news, there is a new argument.
Qt 6.7 has improved its svg support dramatically.
https://www.qt.io/blog/qt-svg-not-so-1.2-tiny-any-more
Although it is not complete, it is worth opening this discussion within the dev community and reavaluate svg file-association for gwenview.
Comment 7 John Kizer 2025-04-10 17:20:36 UTC
*** Bug 502180 has been marked as a duplicate of this bug. ***