datauri for background image of tiddler

71 views
Skip to first unread message

Mohammad

unread,
May 10, 2018, 12:01:51 AM5/10/18
to TiddlyWiki
I am using the following CSS in a tiddler tagged with "$:/tags/Stylesheet"

[data-tags*="slide"]  {
background
: url(<<datauri "Motovun Jack.jpg">>);
}

 but seems the datauri does not work!

What is the problem here?

Birthe C

unread,
May 10, 2018, 3:38:45 AM5/10/18
to TiddlyWiki
Hi Mohammad,
Testing it I got a tiddler full of cats ;-). Did you set a type in your stylesheet tiddler? If you did that might be the reason.

Birthe

Mohammad

unread,
May 10, 2018, 10:51:43 AM5/10/18
to TiddlyWiki
Thank you Birthe!
Yes that was the reason! I changed the type to text/vnd.tiddlywiki and it works now!

Just a question! I have a tiddler with mypic.jpg around 380 kB and then an Stylesheet tiddler with datauri
it should also occupy the same size! So, is it any other way to save the space and minimize the required size?
Reply all
Reply to author
Forward
0 new messages