imgbot / Imgbot

An Azure Function solution to crawl through all of your image files in GitHub and losslessly compress them. This will make the file size go down, but leave the dimensions and quality untouched. Once it's done, ImgBot will open a pull request for you to review and merge. help@imgbot.net
https://imgbot.net/
MIT License
1.24k stars 272 forks source link

Add max-width optimization option #306

Open dabutvin opened 5 years ago

dabutvin commented 5 years ago

Set something in the .imgbotconfig to say maxwidth: 3000 and when ImgBot goes through all the images in the repo, if the width of the image exceeds this it will resize the image before doing the compression routine.

The idea here is, if you check in a 10,000 pixel wide image, even if we run the compression on it, it will still be way oversized for downloading. This will let you specify an upper-limit for the whole repo and have ImgBot check on it for you on a continual basis so you don't have to.

As a part of this we will probably need to extend the pull request template to break out resized from compressed. Maybe want to show the dimensions of all the images in the table too

stale[bot] commented 5 years ago

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.

slorber commented 2 years ago

+1 we would be happy to use imgbot to downscale images in our Docusaurus repo, for our site showcase page.

Those images are user-submitted, quite big by default (we never display them full-screen) and resizing them manually is a time-consuming process.

image

https://github.com/facebook/docusaurus/issues/5980