sharp-loader
sharp-loader copied to clipboard
Let preset options be in the form: function(sharpImage) => sharpImage
This would allow the user full access to sharp transformations, and would even allow the use of third party transformations (openCV, for instance).
Ah yes! Also an option 😄 I'm working on a hefty refactor right now which you can see in an open pull request I have going. I will see if I can find a way to work this in 🎉 It might be a little bit before I get around to finishing everything though, lots on the go 😞
Thanks for the feedback!
Woohoo! The refactor is actually why I didn't submit a PR. In any case, I'm looking forward to it!
Sorry for the big delay @mikestopcontinues . The refactor is pretty much in! 🎉 There's a little bit of work to do to get the ability to do more transformations, but not a lot. Everything is much cleaner now and you should have a clear point of entry to customize things. In particular processImage can be adjusted to run some kind of pre or post pass for processing. Note that because of another requirement for SSR (people want the generated info but not images) you have to walk a little carefully around what metadata you expect back out.
Just took a look. Looks good! I'm in the process of moving countries, but I hope to send a PR your way sometime in June. Thanks!
No problem! 😄Good luck with your move!