[Qgis-user] Problems with custom SVG images when transfering a project to another computer
Bernhard Seckinger
bernhard.seckinger at bueffee.de
Mon Feb 24 04:37:30 PST 2025
Hi,
I'm using QgsSvgMarkerSymbolLayer('some/path/to/icon.svg') to add an icon to a
layer. That works great.
When I'm saving the project, including all layers, into a geopackage, send
that geopackage to a different computer and open ist again, everything works,
but the icons are replaced by black question marks.
The reason is obvious: The project saves the markers with paths that are only
valid on my computer, and thus they cannot be found on the other computer
(they do not even exist).
It wouldn't be a problem to put all the icons in a folder and add that folder
to Settings -> Options -> System -> SVG Path.
And here's my question: What parameter do I have to use on
QgsSvgMarkerSymbolLayer() to access icons via SVG path?
(Alternatively it would be possible to save the icons in the geopackage, but
I've got no clue, where to start with this approach at all.)
Any ideas?
Thanks, Bernhard
--
Bernhard Seckinger <bernhard.seckinger at bueffee.de>
More information about the QGIS-User
mailing list