Comments (17)
@haydenbleasel: Native JavaScript SVG solution, seems also be usable with nodejs (server side): https://github.com/canvg/canvg - so this would finally be possible 😄 .
from favicons.
@strarsis you would need node-canvas for that, which uses native package cairo
from favicons.
What about sharp?
Most modern 64-bit OS X, Windows and Linux (glibc) systems running Node versions 4, 6, 8 and 10 do not require any additional install or runtime dependencies.
from favicons.
What about this? https://github.com/neocotic/convert-svg
from favicons.
What about librsvg?
from favicons.
@cloud-walker It relies on the librsvg package from Brew / Yum / Apt-Get. The solution needs to be 100% JS. Good find though, probably the closest solution thus far.
from favicons.
https://www.npmjs.com/package/svg2png(needs PhantomJS)https://www.npmjs.com/package/svg-to-png(needs Imagemin & PhantomJS)https://github.com/shakiba/svgexport(needs PhantomJS)https://www.npmjs.com/package/librsvg(needs native dependencies)
No luck so far :(
from favicons.
Would installing optional (native) dependencies be acceptable?
from favicons.
@langri-sha possibly, what do you have in mind?
from favicons.
Well, 2gis/node-rsvg
seems to hit home pretty close, in the here and now. Would it be acceptable to add it as a optional dependency and perform a runtime check when a SVG asset is provided?
I'm just assuming there is a sizable portion of users which already have their logo vectors provided in SVG, who are then exporting a PNG to be able to use the package and if perhaps compromising with an optional dependency might be permissive.
from favicons.
@langri-sha I love the look of that module but it definitely requires the native deps. I want to compromise but Google's planning on using this for WSK and their main issue was with native deps. Plus, I'm aiming for a pure JS build system hence the switch to Jimp.
from favicons.
Documented in the README for now, we'll come back to this when possible.
from favicons.
Update: If you're using Gulp, you can pipe from svg2png
for now.
from favicons.
Why is a pure JavaScript solution for SVG rendering required?
Isn't this a build tool and usually run on nodejs (with bindings)?
from favicons.
Weird thing, in my machine Ubuntu 15.10 with Node 6.6.0 e npm 3.10.3 it works when I use an SVG image.
But, at my server machine (in the cloud) it does not work. The server machine is a Ubuntu 14.04 with Node 6.6.0 and npm 3.10.3.
The only diff between these machines is the Ubuntu version.
You guys have any ideia why this happens?
from favicons.
@Hypnosphi It appears that as of #221 Sharp is now used.
from favicons.
So if sharp is now used, what is the status of
Why are you missing certain favicons?
from favicons.
Related Issues (20)
- Next release? HOT 10
- heads up: broken colors package HOT 10
- Bring back coverage report and badge HOT 1
- Can't be used with Next.js: Consider publishing non ESM modules: is a nightmare to setup and make it work! HOT 4
- Improved typescript types HOT 1
- Error When Installing Sharp and/or Favicons
- npm install favicons make http request to https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz HOT 2
- Unsupported platform coast HOT 2
- Handling a few different image files as favicon and touch icon HOT 3
- 7.0.0 is not working on Windows HOT 5
- [Bug] Favicons generates null value for Android platform HOT 1
- Deprecate yandex icon? HOT 3
- Deprecate Windows 8 tile icons HOT 2
- HTML for apple-touch-startup-image HOT 1
- Add a `cacheBustingQueryParam` option for a cache busting system HOT 1
- Add Release and Changelog HOT 1
- update dependency sharp to v0.32.0 HOT 1
- `icons.<platform>.sizes` weird behaviour HOT 3
- Why there is no way to configure shortcut sizes?
- I want only the icon with the '.ico' extension to be created when it is local HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from favicons.