{"id":50352740,"url":"https://github.com/modxcms/mediascanner","last_synced_at":"2026-05-29T21:30:47.398Z","repository":{"id":351891194,"uuid":"638467028","full_name":"modxcms/mediascanner","owner":"modxcms","description":"MODX Revolution media source auditing tool","archived":false,"fork":false,"pushed_at":"2026-04-16T22:27:25.000Z","size":117,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-17T00:31:28.451Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modxcms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-09T12:36:01.000Z","updated_at":"2026-03-27T15:50:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/modxcms/mediascanner","commit_stats":null,"previous_names":["modxcms/mediascanner"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/modxcms/mediascanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fmediascanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fmediascanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fmediascanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fmediascanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modxcms","download_url":"https://codeload.github.com/modxcms/mediascanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fmediascanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33672124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":"2026-05-29T21:30:47.332Z","updated_at":"2026-05-29T21:30:47.391Z","avatar_url":"https://github.com/modxcms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media Scanner\n\nMedia Scanner is a tool that attempts to scan your site for linked assets. This tool\nis primarily intended as a reference for what assets are in use. It does a best guess\neffort to find all linked assets and provides a media browser to review them. \n\nMedia Scanner is limited in that it can not detect the original URL of a masked asset, \nlike those using pThumb or similar to generate a scaled image. It also can not parse\nthrough subsections of dynamically generated pages, like those built with getPage.\n\nWith that in mind, it can be very helpful with identifying possible unused assets. \n\n## Installation\n\nInstall via package management. To generate the initial link stats, go to the Media \nScanner manager page found under the \"Media\" drop down and click on the \"Scan Media\" \nbutton. This will take a while, depending on the size of your site. If this fails, \nyou may need to manually run the included scanning script via CLI or cron.\n\n## Manual Asset Scanning\n\nIf the automatic scanning fails, you can run the included scanning script manually.\nThis is useful if you have a large site, or if you want to run the scanning script \nvia cron.\n\nTo run the scanning script, you need to SSH into your server and run the following \ncommand:\n\n    php /path/to/your/modx/core/components/mediascanner/cron/generate.2x.php\n\nOr for MODX 3.x Versions:\n\n    php /path/to/your/modx/core/components/mediascanner/cron/generate.3x.php\n\nOnce completed, this will output the number of resources indexed. You can then \ngo to the Media Scanner manager page and verify it is showing the newly\ndiscovered links.\n\n## Automatic Scanning\n\nIn general, the automatic scanning should work fine. It renders a page on save, \nand scans it for links. However, the links can change if you make adjustments \nto a template or chunk in your site that would affect the frontend links. If \nthis happens, you can run the scanning script manually to update the links, \nor go to the manager page and click \"Regenerate Links\".\n\n## Disable Automatic Scanning\n\nDue to the way automatic scanning works, it may slow down the save event on \nyour site depending on how your site is set up. If you want to disable automatic\nscanning, you can do so by setting the `mediascanner.allow_regenerate_onsave`\nsystem setting to `No`. It is recommended you then run the scanning script \nmanually via cron.\n\nIf you are just having issues with scanning a specific page, Media Scanner will\nfirst attempt to automatically resolve it by skipping the resource. If that fails\nyou can manually add the Resource ID to the `mediascanner.skip_skan` system \nsetting. This is a comma-separated list of resources to skip when scanning for\nnew assets.\n\n## Disable \"Regenerate Links\" Button\n\nIn the event you have a large site that consistently fails to generate links \nwith the provided button. You can disable it in system settings. This will \nprevent the button from showing up in the manager page. It is recommended you \nthen run the scanning script manually via cron.\n\nTo disable the button, set the system setting \n`mediascanner.allow_regenerate_button` to `No`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodxcms%2Fmediascanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodxcms%2Fmediascanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodxcms%2Fmediascanner/lists"}