-
Notifications
You must be signed in to change notification settings - Fork 86
Embedding images in styles
stonecrusher edited this page May 6, 2018
·
2 revisions
If your styles require images, it's often useful to embed the images inside the styles. Doing so eliminates the delay in downloading the image from a server and makes it so that anyone can just install the file without placing additional images on their machines.
data URIs can be used to embed images in styles. These URIs include encoded data about the image, so are very long. To generate data URIs in Stylish for Firefox, from the edit dialog, choose Insert, Data URI, then choose the file you wish to embed. You can also use the data URI kitchen to generate data URIs.
Note that styles posted to userstyles.org are limited to 250 kB, so you will quickly run out of room if you're using large images.