{"id":26159919,"url":"https://github.com/zaubrik/portrait","last_synced_at":"2025-08-26T16:10:51.375Z","repository":{"id":41151157,"uuid":"473448102","full_name":"Zaubrik/portrait","owner":"Zaubrik","description":"An Open Graph image generator for images that you can embed in your meta tags. Written in Deno.","archived":false,"fork":false,"pushed_at":"2024-03-14T00:11:13.000Z","size":162,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-17T19:45:23.336Z","etag":null,"topics":["deno","open-graph"],"latest_commit_sha":null,"homepage":"https://dev.zaubrik.com/og-image/","language":"TypeScript","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/Zaubrik.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-03-24T03:49:25.000Z","updated_at":"2024-03-13T23:46:11.000Z","dependencies_parsed_at":"2023-10-16T12:54:07.976Z","dependency_job_id":"470f3442-ae0c-4861-8a10-1aa8acf74b8b","html_url":"https://github.com/Zaubrik/portrait","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fportrait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fportrait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fportrait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fportrait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zaubrik","download_url":"https://codeload.github.com/Zaubrik/portrait/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243029109,"owners_count":20224533,"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":["deno","open-graph"],"created_at":"2025-03-11T11:39:32.506Z","updated_at":"2025-03-11T11:39:37.621Z","avatar_url":"https://github.com/Zaubrik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# portrait\n\nPortrait is a service, written in Deno, that generates dynamic\n[Open Graph](http://ogp.me) images that you can embed in your `meta` tags. Try\nit out on [Zaubrik](https://dev.zaubrik.com/og-image/) for free.\n\n## What is this?\n\n\u003cimg src=\"./portrait_zaubrik-2022-04-10.png\" alt=\"Portrait preview\" width=\"50%\" align=\"right\" style=\"padding: 12px\"\u003e\nThis is Zaubrik's service that for each keystroke generates customized dynamic\n images that you can embed in your \u003ccode\u003emeta\u003c/code\u003e tags.\nLots of services like Twitter, Discord and LinkedIn can render the specified\nimage to make your link stand out from the rest!\n\n## How does it work?\n\nIn short, what this service does, is take in a request through its REST API,\ngenerate an\n[HTML Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) using\nthe provided variables and respond with a cached image having the appropriate\nimage properties and headers. Try it out and deploy your own image generator on\n[Deno](https://deno.land/).\n\n## Quick start\n\n```bash\ndeno task serve\n```\n\n## Todo\n\n- `deno bundle` seems to be broken. It works with\n  `deno upgrade --version 1.29.0`.\n- More options\n- Some browser tests\n- Add markdown's **bold** and _italic_ syntax to the text input.\n\n  - Idea:\n    [ctx.measureText](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText)\n    from the Canvas API and RegExp?\n\n  ```ts\n  const regexBold = /\\*\\*([^*]*)\\*\\*/g;\n  const regexItalic = /\\*([^*]*)\\*/g;\n\n  function parse(regExp: RegExp) {\n    return (str: string) =\u003e {\n      return [...str.matchAll(regExp)];\n    };\n  }\n\n  const parseBold = parse(regexBold);\n  const parseItalic = parse(regexItalic);\n\n  let r1 = parseBold(\"aaa bb**ff**ccc,c**cc d**dd\");\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaubrik%2Fportrait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaubrik%2Fportrait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaubrik%2Fportrait/lists"}