Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svg support #386

Merged
merged 6 commits into from
Sep 27, 2019
Merged

Svg support #386

merged 6 commits into from
Sep 27, 2019

Conversation

dabutvin
Copy link
Contributor

#332

  • Added .svg to the extension list for optimizing
  • using svgo to run the compression

pending:

  • expose svgo options to users throught .imgbotconfig
  • update documentation + website
    • call out how to ignore svg optimization ( ignoreFiles = *.svg)

@stale
Copy link

stale bot commented Jul 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the goneStale label Jul 12, 2019
@dabutvin
Copy link
Contributor Author

this is happening for sure - just a matter of when

@stale stale bot removed the goneStale label Jul 12, 2019
@stale
Copy link

stale bot commented Sep 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the goneStale label Sep 10, 2019
@dabutvin dabutvin added pinned prevents stalebot from marking an issue as stale and removed goneStale labels Sep 10, 2019
if (extension == ".svg")
{
var plugins = aggressiveCompression ? Svgo.LossyPlugins : Svgo.LosslessPlugins;
var config = JsonConvert.SerializeObject(new { full = true });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the last part to track down here Error: couldn't find config file ''{full:true}''. just have to get the quotes in the right places

@dabutvin
Copy link
Contributor Author

alright this is confirmed and ready to go!

Lossless by default and you can opt in to lossy compression the same way you would for pngs/jpgs/gifs with the .imgbotconfig aggressiveCompression=true

@dabutvin dabutvin added the svg label Sep 27, 2019
@dabutvin dabutvin merged commit 46397c1 into master Sep 27, 2019
@dabutvin dabutvin deleted the svg-support branch September 27, 2019 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned prevents stalebot from marking an issue as stale svg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant