MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / isImageFile

Function isImageFile

scripts/optimize-images.js:37–40  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

35
36// 获取支持的图片格式
37function isImageFile(filename) {
38 const ext = path.extname(filename).toLowerCase();
39 return ['.jpg', '.jpeg', '.png', '.webp', '.gif'].includes(ext);
40}
41
42// 优化单个图片
43async function optimizeImage(inputPath, outputPath, format, options = {}) {

Callers 1

generateManifestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected