{"id":21319531,"url":"https://github.com/simplajs/simpla-img","last_synced_at":"2026-03-03T08:49:39.175Z","repository":{"id":58239176,"uuid":"43937035","full_name":"simplajs/simpla-img","owner":"simplajs","description":"An editable image you can update inline, built on Simpla","archived":false,"fork":false,"pushed_at":"2017-12-15T05:54:17.000Z","size":614,"stargazers_count":6,"open_issues_count":8,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-15T13:11:21.213Z","etag":null,"topics":["content-management","editable","image","javascript","polymer","simpla","web-components"],"latest_commit_sha":null,"homepage":"https://www.simplajs.org","language":"HTML","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/simplajs.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}},"created_at":"2015-10-09T06:28:16.000Z","updated_at":"2023-05-30T10:50:51.000Z","dependencies_parsed_at":"2022-08-31T03:01:55.102Z","dependency_job_id":null,"html_url":"https://github.com/simplajs/simpla-img","commit_stats":null,"previous_names":["simplaelements/simpla-img"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/simplajs/simpla-img","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplajs%2Fsimpla-img","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplajs%2Fsimpla-img/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplajs%2Fsimpla-img/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplajs%2Fsimpla-img/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplajs","download_url":"https://codeload.github.com/simplajs/simpla-img/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplajs%2Fsimpla-img/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30038538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T06:58:30.252Z","status":"ssl_error","status_checked_at":"2026-03-03T06:58:15.329Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["content-management","editable","image","javascript","polymer","simpla","web-components"],"created_at":"2024-11-21T19:42:41.506Z","updated_at":"2026-03-03T08:49:39.132Z","avatar_url":"https://github.com/simplajs.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simpla Image\n[![Build status][travis-badge]][travis-url] ![Size][size-badge] ![Version][bower-badge] [![Published][webcomponents-badge]][webcomponents-url]\n\nSimpla-img is an editable image that can updated seamlessly inline on your page. It extends `\u003cimg\u003e` and is built on the [Simpla][simpla] content system.\n\n\u003c!---\n```\n\u003ccustom-element-demo\u003e\n  \u003ctemplate\u003e\n    \u003cscript src=\"../webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n    \u003clink rel=\"import\" href=\"simpla-img.html\"\u003e\n\n    \u003cscript src=\"https://unpkg.com/simpla@2.0.0\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      Simpla.init('local');\n      Simpla.editable(true);\n    \u003c/script\u003e\n\n    \u003cstyle\u003e\n      img {\n        max-width: 100%;\n        max-height: 400px;\n        margin-right: 5px;\n      }\n    \u003c/style\u003e\n    \u003cnext-code-block\u003e\u003c/next-code-block\u003e\n  \u003c/template\u003e\n\u003c/custom-element-demo\u003e\n```\n--\u003e\n\n```html\n\u003cimg is=\"simpla-img\" path=\"/img\"\u003e\n```\n\n### Contents\n\n- [Installation and setup](#installation-and-setup)\n- [Editing content](#editing-content)\n- [Saving content](#saving-content)\n- [Initializing with static content](#initializing-with-static-content)\n- [Custom placeholders](#custom-placeholders)\n- [Readonly](#readonly)\n- [Contributing](#contributing)\n\n### Resources\n\n- [API reference][api]\n- [Demo][demo]\n- [License][license]\n\n## Installation and setup\n\nInstall simpla-img with Bower (Yarn support coming soon)\n\n```sh\n$ bower i simpla-img --save\n```\n\n[Setup Simpla][simpla-setup] on your page, then import simpla-img into your `\u003chead\u003e`\n\n```html\n\u003clink rel=\"import\" href=\"/bower_components/simpla-img/simpla-img.html\"\u003e\n```\n\nCreate an editable image by extending `\u003cimg\u003e` with the `is` attribute. Give each img a unique `path`, where it will store its content in your project\n\n```html\n\u003cimg is=\"simpla-img\" path=\"/img\"\u003e\n```\n\n## Editing content\n\nEdit a simpla-img by entering edit mode with Simpla (which makes all Simpla elements on a page editable) or setting the `editable` property directly on an element.\n\n```js\n// Enter edit mode\nSimpla.editable(true);\n```\n\n```html\n\u003c!-- Make only this image editable --\u003e\n\u003cimg is=\"simpla-img\" path=\"/img\" editable\u003e\n```\n\nEntering edit mode with Simpla is the recommended way to edit images. It ensures all elements on a page remain in sync and updates Simpla's public `'editable'` state, which other elements may rely on.\n\n## Saving content\n\nSave a simpla-img by calling Simpla's `save` method, which will save all modified content on the page. It returns a promise.\n\n```js\n// Save all modified Simpla content\nSimpla.save();\n```\n\n\u003e You must be authenticated with Simpla before saving content\n\n## Initializing with static content\n\nYou can set a static `src` of a simpla-img just like you would with a regular `\u003cimg\u003e`. If content for the image's `path` exists on Simpla's API, the locally set `src` will be overwritten\n\n```html\n\u003cimg is=\"simpla-img\" src=\"/local/img.jpg\" path=\"/img\"\u003e\n```\n\nInitializing with static content is useful for converting existing images to Simpla images, or bootstrapping a project with predefined content. By setting `src` and then calling `Simpla.save()` you can easily set content directly to Simpla.\n\n\u003e Since static content is always overwritten by remote data, you should not have `src` set in production. If a newer image gets saved you will experience FOUC (Flash Of Unformatted Content) when the old one is overwritten \n\n## Custom placeholders\n\nYou can set custom placeholders (displayed when simpla-img is editable and doesn't have content) with a `placeholder` attribute\n\n```html\n\u003cimg is=\"simpla-img\" path=\"/img\" placeholder=\"url(https://placehold.it/200x200)\"\u003e\n```\n\n`placeholder` takes any valid CSS `background` value (colors, `url()`, etc). The placeholder does not impact the image's default size or aspect ratio.\n\n## Readonly\n\nSimpla-img has a `readonly` property that stops it from becoming editable, even if Simpla is in edit mode or you try to set `editable` on the element directly. This is useful for using simpla-img to purely consume and display content from Simpla's API.\n\n```html\n\u003cimg is=\"simpla-img\" path=\"/img\" readonly\u003e\n```\n\n## Contributing\n\nIf you find any issues with simpla-img please report them! If you'd like to see a new feature in supported file an issue. We also happily accept PRs. \n\n***\n\nMIT © [Simpla][simpla]\n\n[simpla]: https://www.simpla.io\n[simpla-setup]: https://docs.simpla.io/guides/get-started.html\n\n[api]: https://www.webcomponents.org/element/simplaio/simpla-img/page/API.md\n[demo]: https://www.webcomponents.org/element/simplaio/simpla-img/demo/demo/index.html\n[license]: https://github.com/simplaio/simpla-img/blob/master/LICENSE\n\n[bower-badge]: https://img.shields.io/bower/v/simpla-img.svg\n[travis-badge]: https://img.shields.io/travis/simplaio/simpla-img.svg\n[travis-url]: https://travis-ci.org/simplaio/simpla-img\n[size-badge]: http://img.badgesize.io/simplaio/simpla-img/master/simpla-img.html?compression=gzip\u0026label=render_bundle_%28gzip%29\n[webcomponents-badge]: https://img.shields.io/badge/webcomponents.org-published-blue.svg\n[webcomponents-url]: https://www.webcomponents.org/element/simplaio/simpla-img\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplajs%2Fsimpla-img","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplajs%2Fsimpla-img","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplajs%2Fsimpla-img/lists"}