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

Github星跟蹤圖

ImgBot

ImgBot crawls all your image files in GitHub and submits pull requests after applying a lossless compression.
This will make the file size go down, but leave the dimensions and quality just as good.

screenshot

Configuration

ImgBot supports optional configuration through a .imgbotconfig json file.
This is not a required step to using ImgBot and is only for more advanced scenarios.
This file should be placed in the root of the repository and set to your liking.

{
    "schedule": "daily", // daily, weekly, monthly
    "ignoredFiles": [
    	"*.jpg",                   // by extension
    	"image1.png",              // by filename
    	"public/special_images/*", // by folderpath
    ],
    "aggressiveCompression": "true", // true, false
    "compressWiki": "true" // true, false
}

The following are the currently supported parameters.
If there are any configuration settings you would like to see supported,
please feel free to open an issue here in the repo or shoot an email over
to help@imgbot.net

schedule

  • optional
  • Accepts: daily, weekly, monthly
  • Limits the PRs from ImgBot to once a day, once a week, or once a month respectively
  • The default behavior is to receive ImgBot PRs as images require optimization

ignoredFiles

  • optional
  • Accepts the syntax for searchPattern on Directory.EnumerateFiles()
  • Limits the images optimized by ImgBot by esentially ignoring them
  • When ignoring by filename no path is necessary, when ignoring by foldername full path from root is necessary

aggressiveCompression

  • optional
  • Accepts: true, false
  • Opt in to use lossy compression algorithms
  • The default behavior without this setting is lossless compression

compressWiki

  • optional
  • Accepts: true, false
  • Opt in to also compress wiki repo
    • Example: https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
  • The default behavior is opt out

Find out more: https://imgbot.net/docs

Contributing

All the code for ImgBot is available on GitHub. We will gladly accept contributions for the service, the website, and the documentation. This is where you can find out how to get set up to run locally as well as detailed information on exactly how ImgBot works.

https://imgbot.net/docs#contributing

主要指標

概覽
名稱與所有者imgbot/Imgbot
主編程語言C#
編程語言C# (語言數: 6)
平台
許可證MIT License
所有者活动
創建於2017-08-24 15:31:50
推送於2025-01-28 13:17:09
最后一次提交2022-11-11 16:46:44
發布數27
最新版本名稱2.0.3 (發布於 )
第一版名稱1.0.0 (發布於 )
用户参与
星數1.3k
關注者數41
派生數279
提交數1k
已啟用問題?
問題數0
打開的問題數0
拉請求數456
打開的拉請求數11
關閉的拉請求數664
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?