Suggest using data-URIs instead of an external image if its file size (in bytes) is smaller than the limit.
number
: Limit of file size (in bytes) allowed as data-URI image.
For example, with 3000
:
The following patterns are considered warnings:
.header {
background-image: url('https://ramasilveyra.github.io/stylelint-images/media/image-2.png'); /* 2739 bytes of size */
}
.header {
background: url('https://ramasilveyra.github.io/stylelint-images/media/image-2.png'); /* 2739 bytes of size */
}
.header {
content: url('https://ramasilveyra.github.io/stylelint-images/media/image-2.png'); /* 2739 bytes of size */
}
The following patterns are not considered warnings:
.header {
background-image: url('https://ramasilveyra.github.io/stylelint-images/media/image-1.png'); /* 6486 bytes of size */
}
.header {
background: url('https://ramasilveyra.github.io/stylelint-images/media/image-1.png'); /* 6486 bytes of size */
}
.header {
content: url('https://ramasilveyra.github.io/stylelint-images/media/image-1.png'); /* 6486 bytes of size */
}