{"id":27696714,"url":"https://github.com/aprimadi/imagecomp","last_synced_at":"2025-08-31T23:33:01.587Z","repository":{"id":57488645,"uuid":"121134655","full_name":"aprimadi/imagecomp","owner":"aprimadi","description":"Golang Image Compression Tool","archived":false,"fork":false,"pushed_at":"2018-02-13T05:54:43.000Z","size":4,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-30T02:40:28.895Z","etag":null,"topics":["golang","google-pagespeed","google-pagespeed-insights","image-compression","image-optimization","mozjpeg","pngquant"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aprimadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-11T15:01:29.000Z","updated_at":"2025-04-17T12:12:26.000Z","dependencies_parsed_at":"2022-08-29T13:32:02.397Z","dependency_job_id":null,"html_url":"https://github.com/aprimadi/imagecomp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aprimadi/imagecomp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fimagecomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fimagecomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fimagecomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fimagecomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aprimadi","download_url":"https://codeload.github.com/aprimadi/imagecomp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fimagecomp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273052755,"owners_count":25037270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","google-pagespeed","google-pagespeed-insights","image-compression","image-optimization","mozjpeg","pngquant"],"created_at":"2025-04-25T15:12:36.292Z","updated_at":"2025-08-31T23:33:01.543Z","avatar_url":"https://github.com/aprimadi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imagecomp\n\n**imagecomp** is an image optimization or compression library written in\nGolang that uses `pngquant` and `mozjpeg` under the hood. It is useful for\noptimizing images to conform to the Google PageSpeed Insights suggestion\n(https://developers.google.com/speed/pagespeed/insights/)\n\n## Dependencies\n\n**imagecomp** requires `pngquant` and `mozjpeg` to be installed.\n\n### On Mac OS X\n\nTo install the dependencies using brew do:\n\n```\nbrew install pngquant\nbrew install mozjpeg\n```\n\n### On Ubuntu\n\nTo install `pngquant`:\n\n```\nsudo apt-get install pngquant\n```\n\nTo install `mozjpeg`:\n\n```\ngit clone https://github.com/mozilla/mozjpeg.git\ncd mozjpeg\nautoreconf -fiv\n./configure\nmake\nsudo make install\nsudo ln -s /opt/mozjpeg/bin/cjpeg /usr/bin/cjpeg\nsudo ln -s /opt/mozjpeg/bin/jpegtran /usr/bin/jpegtran\n```\n\n## Usage\n\nTo install, do:\n\n```\ngo get github.com/aprimadi/imagecomp\ngo install github.com/aprimadi/imagecomp\n```\n\nTo optimize images on a given directory do:\n\n```\nimagecomp .\n```\n\nMultiple directories can also be specified:\n\n```\nimagecomp app/assets public/assets\n```\n\n## Advanced Options\n\n**imagecomp** accepts two options `-include` and `-exclude` which supports\nwildcard character `*`. Use this two options to include and exclude path or\nimages being optimized. All paths are included by *default*.\n\nExample:\n\n```\nimagecomp . -exclude \"public/assets/*\"\n```\n\nNot the use of quote `\"`, this is mandatory otherwise the command line (i.e.\nbash) will replace the arguments with real path.\n\nAlso, note that order matters. For example:\n\n```\nimagecomp . -exclude \"*\" -include \"*.jpg\"\n```\n\nIs not the same as:\n\n```\nimagecomp . -include \"*.jpg\" -exclude \"*\"\n```\n\nWhich will excludes all images from being compressed, while the former only\nprocess `.jpg` images.\n\n## Author\n\nArmin Primadi https://github.com/aprimadi\n\nThis library were developed by the [engineering team](https://www.dexcode.com/people) at [Dexcode](https://www.dexcode.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprimadi%2Fimagecomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faprimadi%2Fimagecomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprimadi%2Fimagecomp/lists"}