Closed rossmoody closed 4 years ago
Ross: Would you consider having an external server do the conversion? I have setup something similar for svgs on my site (example), and could do the same for svg-gobbler. Andrew
I would recommend librsvg over GraphicsMagick/ImageMagick. There is an npm wrapper for it: https://www.npmjs.com/package/librsvg
It is pretty straightforward with either library, but they all require sending the svg to a server. If this is okay, I can set something up.
@rossmoody, with above PR, we can use the canvas object to create the file for us.
@rossmoody, forgot closing keyword on commit 😄
TY for the contribution on this one. I backed this one up momentarily until I can think through the usability of it. Being able to export them is awesome, but I found the process of not knowing the size before export to be somewhat frustrating and not a great experience. I think I'd like to implement a way to set the size before export to make this functionality a little more practical.
Agree. Particularly didn't like having to do https://github.com/rossmoody/svg-gobbler/commit/95ddaf89efcfc2cf573a471678c82d1933762692#diff-15d22cd05123f7d831051296c0e7e7f1R205. I think the functionality themselves would be better suited for a 'dropdown' part of the button (or something similar).
For clarity, is the ask above to allow the user to set whatever size they want prior to downloading?
Tricky feature. Could default to the size it is in the DOM.