{"id":13856756,"url":"https://github.com/kracekumar/datasette-render-local-images","last_synced_at":"2025-05-13T03:44:02.766Z","repository":{"id":57417939,"uuid":"304854828","full_name":"kracekumar/datasette-render-local-images","owner":"kracekumar","description":"A datasette plugin to render images in the local system","archived":false,"fork":false,"pushed_at":"2023-02-22T04:31:12.000Z","size":971,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T01:04:45.263Z","etag":null,"topics":["datasette","datasette-plugin","datasette-render-local-images","render-local-images"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kracekumar.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":"2020-10-17T10:42:06.000Z","updated_at":"2023-02-22T04:19:11.000Z","dependencies_parsed_at":"2024-10-24T16:49:59.772Z","dependency_job_id":"59226acb-84f4-4b8c-8364-74eb1a42867d","html_url":"https://github.com/kracekumar/datasette-render-local-images","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"b2a7178e563e5db0eb95283769faed3a36be5635"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kracekumar%2Fdatasette-render-local-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kracekumar%2Fdatasette-render-local-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kracekumar%2Fdatasette-render-local-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kracekumar%2Fdatasette-render-local-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kracekumar","download_url":"https://codeload.github.com/kracekumar/datasette-render-local-images/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253870822,"owners_count":21976610,"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":["datasette","datasette-plugin","datasette-render-local-images","render-local-images"],"created_at":"2024-08-05T03:01:11.950Z","updated_at":"2025-05-13T03:44:02.748Z","avatar_url":"https://github.com/kracekumar.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# datasette-render-local-images\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-render-local-images.svg)](https://pypi.org/project/datasette-render-local-images/)\n[![Changelog](https://img.shields.io/github/v/release/kracekumar/datasette-render-local-images?include_prereleases\u0026label=changelog)](https://github.com/kracekumar/datasette-render-local-images/releases)\n[![Tests](https://github.com/kracekumar/datasette-render-local-images/workflows/Test/badge.svg)](https://github.com/kracekumar/datasette-render-local-images/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/kracekumar/datasette-render-local-images/blob/main/LICENSE)\n\nRender local images in the system using datasette plugin\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n    $ datasette install datasette-render-local-images\n\n## Usage\n\nRender local system images in the datasette displayed HTML.\nThe plugin reads the image and adds the base64 encoded data to `src` attribute,\nthe cell looks like `\u003cimg src=\"data:image/png;base64,A..\" height=\"-1\" width=\"-1\"\u003e`\n\nBy default plugin will figure out image and render with\ndefault height and width of the image.\n\nTo modify the image size and width, pass the configuration via `metadata.json`\n\n``` python\n{\n    \"plugins\": {\n        \"datasette-render-local-images\": {\n            \"height\": 150,\n            \"width\": 150\n        }\n    }\n}\n```\n\nWhen the local image path is missing or no image specified in the path,\nthe plugin will not render the value.\n\n**Note**: While running datasette command don't forget to pass the metadata file\nusing `-m` option like `datasette dataset.db -m metadata.json`.\n\nBelow screenshoot is from the sample table.\n\n[Sample Screenshoot](https://github.com/kracekumar/datasette-render-local-images/blob/main/sample.png)\n\n![](https://github.com/kracekumar/datasette-render-local-images/blob/main/sample.png)\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd datasette-render-local-images\n    python3 -mvenv venv\n    source venv/bin/activate\n\nOr if you are using `pipenv`:\n\n    pipenv shell\n\nNow install the dependencies and tests:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkracekumar%2Fdatasette-render-local-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkracekumar%2Fdatasette-render-local-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkracekumar%2Fdatasette-render-local-images/lists"}