imgbot/Imgbot
소개
GitHub의 모든 이미지 파일을 검색해 무손실 압축하는 Azure Function 솔루션입니다. 파일 크기는 줄이면서 이미지 크기와 품질은 그대로 유지합니다. 작업이 끝나면 검토하고 병합할 수 있도록 ImgBot이 풀 리퀘스트를 엽니다. [email protected]
디자인 및 미디어측정된 스타 증가
- in 24h
- +1
- in 7 days
- +2
- in 15 days
- +2
- in 1 month
- +3
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalImgbot
Imgbot crawls all your image files in GitHub and submits pull requests after applying a loss less compression. This will make the file size go down, but leave the dimensions and quality just as good.

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
"minKBReduced": 500 // set reduction threshold (default to 10),
"prTitle" : "Compressed images", // set pull request title
// set the pull request body, supports any valid github markdown
// {optimization_ratio} display a message containing the optimization ratio
// {optimization_details} display the table containing the optimization details
"prBody" : " Text before optimization ratio {optimization_ratio} Text after optimization ratio
Text before optimization details {optimization_details} Text after optimization details",
}
The following are the currently supported parameters. If there are any configuration settings you would like to see changed or supported, please feel free to open an issue here in the repo or shoot an email over to [email protected]
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 essentially ignoring them
- When ignoring by file name no path is necessary, when ignoring by folder name full path from root is necessary
aggressiveCompression
- Optional
- Accepts: true|false
- Opt in to use lossy compression algorithms
- The default behaviour without this setting is loss less compression
compressWiki
- Optional
- Accepts: true|false
- Opt in to also compress wiki repo
- Example:
https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
- Example:
- The default behaviour is opt out
minKBReduced
- Optional
- Accepts only numbers as input (e.g.
"minKBReduced": 500for a 500 KB threshold) - Can be used to limit the frequency of PRs Imgbot will open over time
- The default setting is 10
prTitle
- Optional
- Available only for paid plans
- Accepts only strings as input (e.g.
"prTitle": "My title") - Can be used to display any custom pull request title
- The default setting is "[ImgBot] Optimize images"
prBody
- Optional
- Available only for paid plans
- Accepts only strings as input
- (e.g.
"prBody": "Text before {optimization_ratio} Text after"
Text before {optimization_details} Text after") - Can be used to display any custom pull request body, written using github markdown
- Supports two magic tags:
{optimization_ratio} //displays the mean optimization ratio for all images
{optimization_details} //display the optimization details for every images - The default setting generates the body displayed here
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.
관련 프로젝트 살펴보기
불러오는 중…