[Tip] You can post SVG directly on Lemmy.
fedilink

Since Lemmy uses Markdown that supports HTML; it is possible to use Scalable Vector Graphics (with the <svg> tag).

It is possible to import SVG art on Lemmy, which isn’t possible on Reddit.


As an example, here is a flag I made.

<svg id=β€œsvg8” width=β€œ297mm” height=β€œ190mm” version=β€œ1.1” viewBox=β€œ0 0 297 190” xmlns=β€œhttp://www.w3.org/2000/svg” xmlns:cc=β€œhttp://creativecommons.org/ns#” xmlns:dc=β€œhttp://purl.org/dc/elements/1.1/” xmlns:rdf=β€œhttp://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:xlink=β€œhttp://www.w3.org/1999/xlink”> <title id=β€œtitle83625”>Freedom of Information Flag</title> <defs id=β€œdefs2”> <symbol id=β€œic_search_24px” viewBox=β€œ0 0 24 24”> <path id=β€œpath6933” d=β€œm4.101 3.7042h-0.20902l-0.074083-0.071438a1.7119 1.7119 0 0 0 0.4154-1.1192 1.7198 1.7198 0 1 0-1.7198 1.7198c0.42598 0 0.81756-0.1561 1.1192-0.4154l0.071438 0.074083v0.20902l1.3229 1.3203 0.39423-0.39423zm-1.5875 0c-0.65881 0-1.1906-0.53181-1.1906-1.1906s0.53181-1.1906 1.1906-1.1906 1.1906 0.53181 1.1906 1.1906-0.53181 1.1906-1.1906 1.1906z” stroke-width=β€œ.26458”/> </symbol> </defs> <metadata id=β€œmetadata5”> rdf:RDF <cc:Work rdf:about=β€œβ€> dc:formatimage/svg+xml</dc:format> <dc:type rdf:resource=β€œhttp://purl.org/dc/dcmitype/StillImage”/> dc:titleFreedom of Information Flag</dc:title> <cc:license rdf:resource=β€œhttp://creativecommons.org/publicdomain/zero/1.0/”/> dc:descriptionA flag to support the universal right to information.

  • Yellow background represents liberty.
  • The magnifying glass is a symbol for information. It is horizontally aligned to represent the lack of bias.
  • The horns represent the idea of copyleft, supported by GNU.</dc:description> dc:subject rdf:Bag rdf:liinformation</rdf:li> rdf:lifree</rdf:li> rdf:lilibre</rdf:li> rdf:lignu</rdf:li> </rdf:Bag> </dc:subject> </cc:Work> <cc:License rdf:about=β€œhttp://creativecommons.org/publicdomain/zero/1.0/”> <cc:permits rdf:resource=β€œhttp://creativecommons.org/ns#Reproduction”/> <cc:permits rdf:resource=β€œhttp://creativecommons.org/ns#Distribution”/> <cc:permits rdf:resource=β€œhttp://creativecommons.org/ns#DerivativeWorks”/> </cc:License> </rdf:RDF> </metadata> <rect id=β€œrect10” y=β€œ-.14054” width=β€œ299.74” height=β€œ192.39” fill=β€œ#ffff00” fill-rule=β€œevenodd” stroke-width=β€œ.26458”/> <g id=β€œlayer1” transform=β€œtranslate(0,-107)” fill=β€œ#000000”> <use id=β€œuse84183” transform=β€œmatrix(2.6112 2.6112 -2.6112 2.6112 10.493 -71.155)” width=β€œ100%” height=β€œ100%” xlink:href=β€œ#ic_search_24px”/> <path id=β€œpath85079” d=β€œm190.56 142.53c2.2453-3.1184 5.228-6.13 7.076-10.306 0.75336-4.9917 0.81194-7.669-0.84953-12.793-1.1288-3.0946-2.0595-5.6271-3.6189-8.589 9.1301 5.6434 11.272 10.243 11.272 10.243 1.9779 5.4942 2.1059 7.4287 1.4032 12.114-2.0111 5.3632-5.285 10.025-11.132 16.23-3.0171-4.7485-4.151-6.8989-4.151-6.8989z”/> <path id=β€œpath85933” d=β€œm110.17 142.28c-2.2453-3.1184-5.0526-5.8728-6.9006-10.049-0.75336-4.9917-0.81194-7.669 0.84953-12.793 1.1288-3.0946 2.0595-5.6271 3.6189-8.589-9.1301 5.6434-11.272 10.243-11.272 10.243-1.9779 5.4942-2.1059 7.4287-1.4032 12.114 2.0111 5.3632 5.1447 9.8842 10.991 16.09 3.0171-4.7485 4.116-7.0158 4.116-7.0158z”/> </g> </svg> </xml>

(The code can be previewed through an HTML viewer.)

scour may be needed to get the SVG art to work.

azron
link
fedilink
9β€’8 hilabete

Thank you for the tip!

Side note, doesn’t appear to work on mobile.

@xarvos@lemmy.ml
link
fedilink
3β€’8 hilabete

i’m on mobile and see the svg just fine

@nachtigall@feddit.de
link
fedilink
2β€’8 hilabete

Probably on the app. I am using Jerboa and it is not displayed.

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

  • 0 users online
  • 5 users / day
  • 15 users / week
  • 41 users / month
  • 165 users / 6 months
  • 4 subscribers
  • 397 Posts
  • 2.99K Comments
  • Modlog