Imgbot
Imgbot copied to clipboard
Optional better compression
N.B.: @dabutvin I don't understand what ImgBot's official position is re: time vs. resources vs. speed for recompression, so if this request is out-of-line, do reply (make official note in docs, too, perhaps) & feel free to close.
ImageMagick is just ok when it comes to recompression. Better is @BenSchwarz's image-actions (pairing libvips w/ MozJPEG). Approaching state-of-the-art is @javiergutierrezchamorro's FileOptimizer (which combines entire toolchains & reports back via a UI). IIUC, each of these options defaults to lossless compression, but have optional lossy modes.
Would you consider integrating these as options?
Hi @TPS ! Thanks for raising this.
I think this would be a great addition to ImgBot. I'm really drawn to extending the platform and giving the user options while providing sensible defaults.
I could see a configuration that allows you to choose, for example, your PNG Optimizer vs your JPG optimizer.
I love this idea! I think the best place to start is to add an interface for both lossless compression and lossy compression and implement it with the existing ImageMagick setup. Then we can implement the interface with any number of libraries and work on the best way to put the user in control of what kind of image optimization they are looking for.
roughly what I'm thinking
interface ICompress
{
Task LosslessCompress(path);
Task LossyCompress(path);
string[] AllowedExtensions { get; }
}
And then implement with
class ImageMagickCompress : ICompress
{
...
}
@dabutvin Thanks for your interest (even enthusiasm) for this. I do like your idea of implementing this in stages, in which case this issue would make a fine tracking issue. Maybe it'd be better to split off individual stages to their own issues? Then those could be labeled good first issue,help wanted, &c, which would better reflect their scope.
I just opened the first one of these, we can add more as we think of them too. #488
We don't necessarily have to implement both lossless and lossy compression for every library, we can incorporate lossy only plugins as well.
Thanks for raising this issue @TPS this is a really good idea!
Thanks for working @ it, @dabutvin. Wouldn't it be better, though, to keep this open, so it's readily found & subscribed to?
Yeah good point :)
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.
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.
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.
If this is a long-term tracking issue, is there anyway to get @Stale to ignore it?
@TPS indeed, there is :wink:
Approaching state-of-the-art is @javiergutierrezchamorro's FileOptimizer (which combines entire toolchains & reports back via a UI). IIUC, each of these options defaults to lossless compression, but have optional lossy modes.
@dabutvin It looks like @devedse's Web Optimization Project will be kind of a superset of ImgBot, based on FileOptimizer. Maybe some cross-pollination might be useful?
Hey all, if you guys are interested in some collaboration let me know :).
👋 Hello and welcome @devedse