{"id":29902826,"url":"https://github.com/maisonsmd/carta-plugin-imsize","last_synced_at":"2026-04-18T18:06:18.516Z","repository":{"id":218361043,"uuid":"746245779","full_name":"maisonsmd/carta-plugin-imsize","owner":"maisonsmd","description":"This plugin adds ability to render images in specific sizes to Carta.","archived":false,"fork":false,"pushed_at":"2024-10-30T07:54:31.000Z","size":116,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T13:48:29.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/maisonsmd.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":"2024-01-21T14:04:42.000Z","updated_at":"2024-10-30T07:50:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"5235ceb7-c57f-42c9-a6bd-56526e0628a7","html_url":"https://github.com/maisonsmd/carta-plugin-imsize","commit_stats":null,"previous_names":["maisonsmd/carta-plugin-imsize"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/maisonsmd/carta-plugin-imsize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maisonsmd%2Fcarta-plugin-imsize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maisonsmd%2Fcarta-plugin-imsize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maisonsmd%2Fcarta-plugin-imsize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maisonsmd%2Fcarta-plugin-imsize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maisonsmd","download_url":"https://codeload.github.com/maisonsmd/carta-plugin-imsize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maisonsmd%2Fcarta-plugin-imsize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268257468,"owners_count":24221059,"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-08-01T02:00:08.611Z","response_time":67,"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":"2025-08-01T16:15:37.909Z","updated_at":"2026-04-18T18:06:13.477Z","avatar_url":"https://github.com/maisonsmd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![carta-plugin-imsize](https://img.shields.io/npm/v/carta-plugin-imsize)\n\n# carta-plugin-imsize\n\nThis plugin adds ability to render images in specific sizes to [Carta](https://github.com/BearToCode/carta).\n\n## Installation\n\n```shell\nnpm i carta-plugin-imsize\n```\n\n## Setup\n\n### Styles\n\nFor custom styles, this is an example of the generated HTML:\n\n```HTML\n\u003cdiv class=\"image-container\"\u003e\n\t\u003cimg\n\t\tsrc=\"path/to/image\"\n\t\talt=\"image alt\"\n\t\ttitle=\"image title\"\n\t\twidth=\"300\"\n\t\theight=\"200\"\n\t/\u003e\n\u003c/div\u003e\n```\n\nExample CSS:\n\n```CSS\n/* Create a light blue background for images that fill parent's width */\n.markdown-body .image-container {\n\tpadding: 5px;\n\tbackground-color: lightblue;\n\ttext-align: center;\n}\n\n.markdown-body .image-container img {\n\tobject-fit: contain;\n\tmax-width: 100%; \n\tmax-height: 100%;\n}\n```\n\nThe images are shrunk to fit its container by default.\n\n### Extension\n\n```svelte\n\u003cscript\u003e\n\timport { Carta, MarkdownEditor } from 'carta-md';\n\timport { imsize } from 'carta-plugin-imsize';\n\n\tconst carta = new Carta({\n\t\textensions: [imsize()],\n\t});\n\u003c/script\u003e\n\n\u003cMarkdownEditor {carta} /\u003e\n```\n\n## Usage\n\nImage title, width and height are optional\n\n```markdown\nWith all parameters:\n![image alt](/path/to/image \"image title\" =200x300)\n\nWith only with and height:\n![image alt](/path/to/image =200x300)\n\nWith only height:\n![image alt](/path/to/image =x300)\n\nWith only width:\n![image alt](/path/to/image =200x)\n\nWith no parameters:\n![image alt](/path/to/image =x)\n![image alt](/path/to/image)\n```\n\nCheck the example [here](./src/routes/+page.svelte) for more detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaisonsmd%2Fcarta-plugin-imsize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaisonsmd%2Fcarta-plugin-imsize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaisonsmd%2Fcarta-plugin-imsize/lists"}