{"id":16798926,"url":"https://github.com/sjelfull/url2png","last_synced_at":"2025-04-11T00:14:02.084Z","repository":{"id":20455602,"uuid":"23732787","full_name":"sjelfull/url2png","owner":"sjelfull","description":"Lets you embed screenshots of webpages via the URL2PNG API.","archived":false,"fork":false,"pushed_at":"2017-02-25T19:46:19.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T00:13:52.881Z","etag":null,"topics":["craftcms","craftcms-plugin"],"latest_commit_sha":null,"homepage":null,"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/sjelfull.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":"2014-09-06T11:05:02.000Z","updated_at":"2018-05-25T15:51:26.000Z","dependencies_parsed_at":"2022-08-28T19:19:27.860Z","dependency_job_id":null,"html_url":"https://github.com/sjelfull/url2png","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Furl2png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Furl2png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Furl2png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Furl2png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjelfull","download_url":"https://codeload.github.com/sjelfull/url2png/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317730,"owners_count":21083530,"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":["craftcms","craftcms-plugin"],"created_at":"2024-10-13T09:27:18.041Z","updated_at":"2025-04-11T00:14:02.061Z","avatar_url":"https://github.com/sjelfull.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Craft URL2PNG\n![Logo](url2png/resources/logo.png)\n\nLets you embed screenshots of webpages via the URL2PNG API.\n\n## Installation\n* Place the **url2png** folder inside your **craft/plugins** folder\n* Go to **settings/plugins** and install URL2PNG.\n* Get your API key and secret from [url2png.com](https://www.url2png.com/) (signup with promo code **CRAFT** to get $40 credit.)\n* Add the key/secret under URL2PNG settings\n\n## Usage\n\n### Image embed\n```twig\n{{ craft.url2png.img({\n            url: 'http://buildwithcraft.com',\n            width: 500\n}) | raw }}\n```\n\nRemember to include the raw filter. There is no current option to prevent Craft autoescaping the HTML returned from plugin templates in the frontend.\n\n### URL\n```twig\n{% set img = craft.url2png.url({\n        url: 'http://buildwithcraft.com',\n        thumbnail_max_width: 500\n        }) %}\n\n\u003cdiv style=\"background-image: url({{ img }}); width: 500px; height: 500px;\"\u003e\u003c/div\u003e\n```\n\n## Options\n\n| Name                     | Description                                                          | Default  |\n| ------------------------ | :------------------------------------------------------------------ | ------: |\n| url                      | The url of the webpage you want to fetch                             ||\n| thumbnail_max_width      | Constrain screenshot based on width. i.e. 500                        | 1:1 |\n| viewport                 | Set viewport dimensions, adjust to your hearts content. i.e. 500x500 | 1480x1037 |\n| fullpage                 | Will attempt to capture entire document canvas.                      | false |\n| unique                   | Forces a fresh screenshot by varying this value. i.e. a timestamp.   ||\n| user_agent               | Pass a custom user user agent                                        ||\n| accept_languages         | Override the default HTTP Accept-Language header.                    | en-US,en;q=0.8 |\n| custom_css_url           | Fetches a CSS stylesheet and injects it.                             ||\n| say_cheese               | Delay screenshot until ```\u003cdiv id='url2png-cheese'\u003e\u003c/div\u003e``` is available. ||\n| ttl                      | Set the TTL or \"time to live\" value for a screenshot in seconds. Defaults to 2592000 (30 days) ||\n| alt                      | Sets the img alt attribute                                           ||\n| class                    | Sets the img class attribute                                         ||\n| width                    | Sets the img width attribute                                         ||\n| height                   | Sets the img height attribute                                        ||\n\n## Credits\n\nIcon: Camera by Alfa Design from the Noun Project","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Furl2png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjelfull%2Furl2png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Furl2png/lists"}