IMGBOT รวบรวมข้อมูลไฟล์รูปภาพทั้งหมดของคุณใน GitHub และส่งคำขอดึงหลังจากใช้การบีบอัดการสูญเสียน้อยลง สิ่งนี้จะทำให้ขนาดไฟล์ลดลง แต่ทิ้งมิติและคุณภาพไว้ให้ดี
IMGBOT รองรับการกำหนดค่าเพิ่มเติมผ่านไฟล์. .imgbotconfig JSON นี่ไม่ใช่ขั้นตอนที่จำเป็นในการใช้ IMGBOT และเป็นเพียงสถานการณ์ขั้นสูงเท่านั้น ไฟล์นี้ควรวางไว้ในรูทของที่เก็บและตั้งค่าตามความชอบของคุณ
{
"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",
}
ต่อไปนี้เป็นพารามิเตอร์ที่รองรับในปัจจุบัน หากมีการตั้งค่าการกำหนดค่าใด ๆ ที่คุณต้องการดูการเปลี่ยนแปลงหรือสนับสนุนโปรดเปิดปัญหาที่นี่ใน repo หรือส่งอีเมลไปที่ [email protected] ที่นี่
กำหนดการ
ไม่สนใจไฟล์
aggressivecompression
บีบอัด
https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.gitminkreduced
"minKBReduced": 500 สำหรับเกณฑ์ 500 kb)prtitle
"prTitle": "My title" )prbody
"prBody": "Text before {optimization_ratio} Text after"Text before {optimization_details} Text after" ){optimization_ratio} //displays the mean optimization ratio for all images{optimization_details} //display the optimization details for every imagesค้นหาข้อมูลเพิ่มเติม: https://imgbot.net/docs
รหัสทั้งหมดสำหรับ IMGBOT มีอยู่ใน GitHub เรายินดีที่จะยอมรับการมีส่วนร่วมสำหรับบริการเว็บไซต์และเอกสาร นี่คือที่ที่คุณสามารถค้นหาวิธีการตั้งค่าให้ทำงานในพื้นที่รวมถึงข้อมูลรายละเอียดเกี่ยวกับวิธีการทำงานของ IMGBOT
https://imgbot.net/docs#contributing