gulp-smoosher icon indicating copy to clipboard operation
gulp-smoosher copied to clipboard

Inline images to base64

Open simonzack opened this issue 9 years ago • 8 comments

Could this be considered?

simonzack avatar Mar 01 '15 18:03 simonzack

Maybe - could you post an example of how you envision the workflow?

gabrielflorit avatar Mar 02 '15 16:03 gabrielflorit

I'm using this with gulp to build userscripts (greasemonkey). User scripts don't support images (or any local resources at all, really), so they need to be bundled in the html.

simonzack avatar Mar 02 '15 17:03 simonzack

I'd recommend you inline the images before you pass them to smoosher, with something like https://github.com/Wenqer/gulp-base64.

gabrielflorit avatar Mar 03 '15 18:03 gabrielflorit

@gabrielflorit That's for stylesheets. I'm after inlining images in html, i.e. <img> tags.

simonzack avatar Mar 03 '15 18:03 simonzack

Oh I see. Interesting. There's gotta be a plugin for that. It should be separate from this one. Looking.

gabrielflorit avatar Mar 03 '15 19:03 gabrielflorit

Here's one: https://github.com/zckrs/gulp-css-base64

jgwconsulting avatar Mar 05 '15 10:03 jgwconsulting

@jgwconsulting that's for stylesheets.

gabrielflorit avatar Mar 09 '15 18:03 gabrielflorit

Oops, it would help if I could read properly! Maybe this one: https://github.com/rabidaudio/gulp-inline-image-html

jeromewilson avatar Mar 09 '15 22:03 jeromewilson