{"id":21707342,"url":"https://github.com/s-leroux/feat-image","last_synced_at":"2025-07-27T07:40:48.548Z","repository":{"id":43727716,"uuid":"150652196","full_name":"s-leroux/feat-image","owner":"s-leroux","description":"Find the featured image URL from a web page","archived":false,"fork":false,"pushed_at":"2023-07-19T18:56:44.000Z","size":242,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T16:11:19.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/s-leroux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-09-27T21:53:12.000Z","updated_at":"2022-07-07T13:39:55.000Z","dependencies_parsed_at":"2025-01-25T16:10:38.234Z","dependency_job_id":null,"html_url":"https://github.com/s-leroux/feat-image","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-leroux%2Ffeat-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-leroux%2Ffeat-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-leroux%2Ffeat-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-leroux%2Ffeat-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-leroux","download_url":"https://codeload.github.com/s-leroux/feat-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244656734,"owners_count":20488641,"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","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-25T22:17:11.716Z","updated_at":"2025-03-20T17:20:13.348Z","avatar_url":"https://github.com/s-leroux.png","language":"JavaScript","readme":"feat-image\n==========\n\nLoad the featured images and other metadata from a web page.\n\n\n[![Build Status](https://github.com/s-leroux/feat-image/actions/workflows/npm-test.yml/badge.svg)](https://github.com/s-leroux/feat-image/actions/workflows/npm-test.yml)\n\n## Installation\n\n    npm install --save feat-image\n\n\n## Basic usage\n\n```\nconst fi = require(\"feat-image\");\nconst imageUrls = await fi(webPageUrl);\n```\n\nLoad a web page and extract the URL for the featured images based on the\n`meta` `og:image` and `twitter:image` tags. Duplicates are removed.\n\n## Advanced usage\n\n```\nconst fi = require(\"feat-image\");\nconst about = await fi.about(webPageUrl);\n\nconsole.log(url\", about.url);\nconsole.log(\"title\", about.title);\nconsole.log(\"description\", about.description);\nconsole.log(\"feature images\", about.fi);\n```\n\nLoad a web page and extract metadata based on open graph and twitter card data.\nAll attributes are returned as an array with duplicates removed.\n\n## Example\n\n```\nconst fi = require(\"feat-image\");\n\nconst about = await fi.about(\"https://en.wikipedia.org/wiki/Ada_Lovelace\");\nconsole.dir(about);\n{\n  fi: [\n    {\n      href: 'https://upload.wikimedia.org/wikipedia/commons/0/0b/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850.jpg',\n      width: 1200,\n      height: 1651\n    },\n    {\n      href: 'https://upload.wikimedia.org/wikipedia/commons/0/0b/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850.jpg',\n      width: 800,\n      height: 1101\n    },\n    {\n      href: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850.jpg/640px-Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850.jpg',\n      width: 640,\n      height: 880\n    }\n  ],\n  url: [ 'https://en.wikipedia.org/wiki/Ada_Lovelace' ],\n  title: [ 'Ada Lovelace - Wikipedia' ],\n  description: []\n}\n```\n\n## Node version\nRequire NodeJS \u003e= v12.0\nTested with v12.0 and v14.15\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2018-2022 [Sylvain Leroux](mailto:sylvain@chicoree.fr)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-leroux%2Ffeat-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-leroux%2Ffeat-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-leroux%2Ffeat-image/lists"}