tm-minty / sublime-text-2-image2base64 Goto Github PK
View Code? Open in Web Editor NEWConvert images to base64
Convert images to base64
Use mimetype
lib to detect type of file
It would be nice, if will be possible convert external links, not merely images from sidebar.
I used to quick download my images in third-party servers, and I need convert Imgur images, not my sidebar images.
I select link http://i.imgur.com/Ir1oYnF.jpg → Ctrl+Shift+P → Image2Base64: Convert External Link
→ data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSjAndSoOn…
transfer to my clipboard.
Thanks.
When I press Ctrl+i+b in Sublime Text 3.
But clipboard has no base64 code!!!? #
Use glob
library instead of os.walk
Hey @tm-minty, first of all thanks for a nice plugin. I don't know what all use-cases you have in mind for this plugin.
But I have a suggestion, and would be interested to know what are your views on it.
So this is what I want, if you click on an image it will open the image file as data URI format. and the content will be selected by default.
so you can just press ctrl+c
to copy and then paste it as parameter of background-url()
or as src
of <img>
. If I use image2base64
plugin, i need to add 'data: image/[file_extenstion]; base64, [encodedvalue]
manually every time.
I would not like to create another plugin which mimics the almost same functionality as yours and more importantly they will conflict with each.
Here is the implementation https://gist.github.com/SaurabhKumar/4971496
Let me know you thoughts on it.
Cheers,
Saurabh
All svg images open as base64 and is not possible to see the xml data anymore.
Hi,
I am using Sublime Text 3 and your plugin does not appear in Package control.
Will it work in ST3?
/Sten
It would be nice, if long Data URI will break to new line. Data URI will be valid.
In Sublime Text if line length have more than 16383 characters, syntax for line don't highlight. See more details.
If in package settings "split_long_line": true
, 16000 characters of long Data URI stay in current line, next 16000 characters wrap to next line, next 16000 characters wrap to next line and so on.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.