{"id":13447570,"url":"https://github.com/scottjehl/picturefill","last_synced_at":"2025-10-22T21:22:37.413Z","repository":{"id":2525765,"uuid":"3502120","full_name":"scottjehl/picturefill","owner":"scottjehl","description":"A responsive image polyfill for \u003cpicture\u003e, srcset, sizes, and more","archived":true,"fork":false,"pushed_at":"2022-09-06T15:00:20.000Z","size":17463,"stargazers_count":9843,"open_issues_count":1,"forks_count":1061,"subscribers_count":340,"default_branch":"master","last_synced_at":"2025-10-16T14:37:42.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://scottjehl.github.com/picturefill/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottjehl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-21T08:35:14.000Z","updated_at":"2025-10-07T18:02:36.000Z","dependencies_parsed_at":"2022-09-09T13:21:58.130Z","dependency_job_id":null,"html_url":"https://github.com/scottjehl/picturefill","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/scottjehl/picturefill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottjehl%2Fpicturefill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottjehl%2Fpicturefill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottjehl%2Fpicturefill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottjehl%2Fpicturefill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottjehl","download_url":"https://codeload.github.com/scottjehl/picturefill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottjehl%2Fpicturefill/sbom","scorecard":{"id":805725,"data":{"date":"2025-08-11","repo":{"name":"github.com/scottjehl/picturefill","commit":"a685bc723e5d99f1e0486fd556a0dfa280e9c2d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/21 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch '3.0'","Warn: branch protection not enabled for branch '2.3'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T11:42:48.833Z","repository_id":2525765,"created_at":"2025-08-23T11:42:48.833Z","updated_at":"2025-08-23T11:42:48.833Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279809669,"owners_count":26230377,"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-19T02:00:07.647Z","response_time":64,"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-07-31T05:01:21.298Z","updated_at":"2025-10-22T21:22:36.154Z","avatar_url":"https://github.com/scottjehl.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Web 前端","Misc","Misc [🔝](#readme)","UI","大杂烩"],"sub_categories":["Other","其它"],"readme":"# Picturefill\nA [responsive image](http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#embedded-content) polyfill.\n* Authors: See [Authors.txt](https://raw.githubusercontent.com/scottjehl/picturefill/master/Authors.txt)\n* License: MIT\n\n## This project is archived and deprecated! \nAt the time, it helped us transition to responsive image HTML patterns until browsers supported them. Support and fallback strategies are now very good, and this project is no longer needed or recommended. Thanks everyone!`\n\n\n[![build-status](https://api.travis-ci.org/scottjehl/picturefill.svg)](https://travis-ci.org/scottjehl/picturefill) [\u003cimg src=\"https://pf-slackin.herokuapp.com/badge.svg\" alt=\"Join Slack channel\"\u003e](https://pf-slackin.herokuapp.com/) [![picturefill on npm](https://img.shields.io/npm/v/picturefill.svg?style=flat)](https://www.npmjs.com/package/picturefill)\n\nPicturefill has three versions:\n\n* Version 1 mimics the Picture element pattern with `span` elements. It is no longer maintained.\n* Version 2 is a lightweight polyfill of the [Picture element draft specification](http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#embedded-content).\n* Version 3.0.3 is the current stable release.\n\n## Usage, Demos, Docs\nTo find out how to use Picturefill, visit the [project site](http://scottjehl.github.io/picturefill/).\n\n## The gotchas\nBe it browser issues, the responsive images specifications, or Picturefill itself, there are a couple gotchas you should be aware of when working with Picturefill:\n\n- Firefox 38 and 39 has some bugs [[1]](https://bugzilla.mozilla.org/show_bug.cgi?id=1139560) [[2]](https://bugzilla.mozilla.org/show_bug.cgi?id=1139554) [[3]](https://bugzilla.mozilla.org/show_bug.cgi?id=1135812) where images won't update on screen resize. These issues are addressed by Picturefill 3.0.0, and was fixed in Firefox 41.\n\n- Per the `picture` spec, using `%` _isn't_ allowed in the `sizes` attribute. Using `%` will fallback to `100vw`.\n\n- Trying to use the `src` attribute in a browser that _doesn't_ support `picture` natively can result in a double download. To avoid this, don't use the `src` attribute on the `img` tag:\n\n```html\n\u003cpicture\u003e\n    \u003csource srcset=\"../img/sample.svg\" media=\"(min-width: 768px)\" /\u003e\n    \u003cimg srcset=\"default.png\" alt=\"Sample pic\" /\u003e\n\u003c/picture\u003e\n```\n\n- If you only want to have an image show up at certain sizes, and not show up at others, you will need to use a transparent placeholder gif:\n\n```html\n\u003cpicture\u003e\n    \u003csource srcset=\"../img/sample.svg\" media=\"(min-width: 768px)\" /\u003e\n    \u003cimg srcset=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"\n        alt=\"Sample pic\" /\u003e\n\u003c/picture\u003e\n```\n\n## Contributing\nFor information on how to contribute code to Picturefill, check out [`CONTRIBUTING.md`](CONTRIBUTING.md)\n\n## Issues\nIf you find a bug in Picturefill, please add it to [the issue tracker](https://github.com/scottjehl/picturefill/issues)\n\n## Discussion\nPicturefill discussion takes place via Slack. For an invitation, visit [https://pf-slackin.herokuapp.com/](https://pf-slackin.herokuapp.com/)\n\n## Support\nThere are currently no known unsupported browsers, provided that you use the markup patterns provided.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottjehl%2Fpicturefill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottjehl%2Fpicturefill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottjehl%2Fpicturefill/lists"}