{"id":20816077,"url":"https://github.com/arillo/silverstripe-shortpixel","last_synced_at":"2025-10-11T16:46:48.170Z","repository":{"id":62487031,"uuid":"199856517","full_name":"arillo/silverstripe-shortpixel","owner":"arillo","description":"It will gradually optimize all images in a given folder (e.g. assets folder) via shortpixel api.","archived":false,"fork":false,"pushed_at":"2019-09-26T15:33:28.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-01T20:54:36.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/arillo.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":"2019-07-31T12:57:21.000Z","updated_at":"2019-09-26T15:33:29.000Z","dependencies_parsed_at":"2022-11-02T10:46:37.256Z","dependency_job_id":null,"html_url":"https://github.com/arillo/silverstripe-shortpixel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arillo/silverstripe-shortpixel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arillo%2Fsilverstripe-shortpixel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arillo%2Fsilverstripe-shortpixel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arillo%2Fsilverstripe-shortpixel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arillo%2Fsilverstripe-shortpixel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arillo","download_url":"https://codeload.github.com/arillo/silverstripe-shortpixel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arillo%2Fsilverstripe-shortpixel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007975,"owners_count":26084369,"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-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2024-11-17T21:27:57.448Z","updated_at":"2025-10-11T16:46:48.140Z","avatar_url":"https://github.com/arillo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Silverstripe Shortpixel\n\n[![Latest Stable Version](https://poser.pugx.org/arillo/silverstripe-shortpixel/v/stable)](https://packagist.org/packages/arillo/silverstripe-shortpixel)\n[![Total Downloads](https://poser.pugx.org/arillo/silverstripe-shortpixel/downloads)](https://packagist.org/packages/arillo/silverstripe-shortpixel)\n[![License](https://poser.pugx.org/arillo/silverstripe-shortpixel/license)](https://packagist.org/packages/arillo/silverstripe-shortpixel)\n\n**CAUTION: work in progress, do not use in production!**\n\nIt will gradually optimze all images in a given folder (e.g. assets folder) via [shortpixel api](https://shortpixel.com) .\nPurposed to run via cronjob.\n\nAdds a Shortpixel-Tab to your `SiteConfig`, where you can switch off task execution and where you can find api status information.\n\n## Setup\n\nGet a shortpixel api key and set it in your `.env`:\n\n```\nSP_APIKEY=\"\u003cYOUR_SHORTPIXEL_API_KEY\u003e\"\n```\n\nConfiguration file (e.g. shortpixel.yml):\n\n```\n---\nName: myshortpixelconfig\nAfter:\n  - '#shortpixelconfig'\n---\nArillo\\Shortpixel\\Shortpixel:\n  # all option in: ShortPixel\\ShortPixel::$options\n  options:\n    lossy: 0 # 1 - lossy, 2 - glossy, 0 - lossless\n\nArillo\\Shortpixel\\Tasks\\FolderTask:\n  exclude_folders:\n    - '.protected' # omit .protected, default nothing\n\n  # configure ShortPixel\n  shortpixel_settings:\n    max_allowed_files_per_call: 5 # default: 10\n    client_max_body_size: 20 # default: 48\n    wait: 300 # default: 500\n\n  # you can turn off auto file re-hashing, if you want to.\n  # plays nice with beforeShortPixelCall and afterShortPixelCall hooks, to create your own recovery strategy\n  use_simple_image_recovering: false # default true\n\n  # optionally you can set the root folder\n  root_folder: \u003cABSOLUTE_PATH_TO_ROOT_FOLDER\u003e # default ASSETS_PATH\n\n```\n\nSetup an cronjob to execute the task:\n\n```\n*/1 * * * * php vendor/silverstripe/framework/cli-script.php dev/tasks/ShortpixelFolderTask\n```\n\nYou might need to play around with cronjob timing and `shortpixel_settings` to avoid multiple overlapping executions.\n\nFind more information about options \u0026 settings in `Arillo\\Shortpixel\\Tasks\\FolderTask`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farillo%2Fsilverstripe-shortpixel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farillo%2Fsilverstripe-shortpixel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farillo%2Fsilverstripe-shortpixel/lists"}