Opened 6 years ago

Last modified 3 years ago

#16811 assigned enhancement

use build-process to inline images in supported browsers

Reported by: gerhard presser Owned by: Rawld Gill
Priority: low Milestone: 2.0
Component: BuildSystem Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

the build-process could inline referenced background-images in the CSS-files using data/urls to avoid client-server-requests...

e.g.

background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlpJREFUeNqkU8tu2lAQHT8wtlEQcUKUIjVVgaiCVkhIlSq1isSKTdRNuu5P8AX5Alb9g+6zqZR8QNWmC3ZRa1UJIm0hAWpeNthg/OiMechl00UtHXvuvXPOnbn3mPF9H/7n4en1nmGAwy+BAUghTjB8iThY5v1EfMatzhB3Lg4Ib3FzfkPwdUSSKulCIZs6PFSkeFykCi1dL95dXx81rq7e2JZVxbwPf1WwIkuJxOmL4+Ocz/PSzHHgvtEIFhRFkfdzOTmZTu/ULi5OJ6MRrERYemFZKU4UK8VyOTcyTWk4HEKr1YLC+XkAimluPJ1Kz0qlHBuNVoizFsB+Tg7y+ezAMKQRqhuGAaZprkujmOZ0XQcDRfYymay7OKdFCw7Aq61kUtH6/TVpPB5Dp9MJSLfYiue6i555Hna3txXi4PDdSuChx7Kig3278zkYgwGYkwk0m02IRCLA4jy3Usb1qWmKxAlXAA4u2FQ6VuHjbhGcI3IsFgNh47Q5zHXCtzAH+GV0u0Vf02QpZCy1VAq+8Y27ntv2lDjrQ0S1T912u7eF/ck4lheGgpKqQrleD2I5BN2y+sQJC5zd9np1YFlLRldSUhQhCEKwYzRE9jzPas9mN8RZC3hoz4nrVi81TcUFS0KRJM5/yWQCUCwhbCTXxmPV9LwqcYjLkFUZJDzCwXN042OWreQEIftEEJQEx4mUNHTd6Xfb7qu2fdNAcg1d+IMMSNylAB3mDmIX7bWfBzjaA3iKV/dgabT7LsDXbwAfcVsM4TdCQ66zEmBDbfL/+IPJURMyKHK9PwIMAA7iHkoee771AAAAAElFTkSuQmCC");

AFAIK it should be supported in all major browsers.

IE7 has a size limit. IE6 doesn't support it - this would require a browser switch.

Change History (4)

comment:1 Changed 6 years ago by Rawld Gill

Milestone: tbdfuture
Status: newassigned

comment:2 Changed 6 years ago by Rawld Gill

Priority: undecidedlow

comment:3 Changed 3 years ago by dylan

Milestone: future2.0

comment:4 Changed 3 years ago by dylan

For Dojo 2, we could use something like https://www.npmjs.com/package/grunt-inline-images (assuming we use Grunt), or something like https://www.npmjs.com/package/gulp-inline-base64 for Gulp.

Note: See TracTickets for help on using tickets.