{"id":23770955,"url":"https://github.com/bubblydoo/librsvg-lambda-layer","last_synced_at":"2026-03-30T08:30:18.198Z","repository":{"id":49778328,"uuid":"293484172","full_name":"bubblydoo/librsvg-lambda-layer","owner":"bubblydoo","description":"Convert SVG images easily to PNG and JPG using AWS Lambda.","archived":false,"fork":false,"pushed_at":"2024-04-07T03:47:34.000Z","size":3434,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-01T03:18:24.601Z","etag":null,"topics":["lambda-layer","librsvg","serverless"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bubblydoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-07T09:36:03.000Z","updated_at":"2024-04-18T00:03:57.000Z","dependencies_parsed_at":"2022-08-12T20:40:12.920Z","dependency_job_id":null,"html_url":"https://github.com/bubblydoo/librsvg-lambda-layer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubblydoo%2Flibrsvg-lambda-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubblydoo%2Flibrsvg-lambda-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubblydoo%2Flibrsvg-lambda-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubblydoo%2Flibrsvg-lambda-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bubblydoo","download_url":"https://codeload.github.com/bubblydoo/librsvg-lambda-layer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239952639,"owners_count":19723924,"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":["lambda-layer","librsvg","serverless"],"created_at":"2025-01-01T03:18:37.647Z","updated_at":"2026-03-30T08:30:18.165Z","avatar_url":"https://github.com/bubblydoo.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibRSVG for AWS Lambda\n\n![Releases](https://img.shields.io/github/v/release/bubblydoo/librsvg-lambda-layer.svg)\n![Build Docker Layer](https://github.com/bubblydoo/librsvg-lambda-layer/workflows/Build%20Docker%20Layer/badge.svg)\n\nDockerfile to statically compile LibRSVG for AWS Lambda instances powered by Amazon Linux 2.x.\nPre-built layers are available for both x86_64 and arm64 Lambdas.\n\n## Usage\n\nThe `rsvg` binary will be in `/opt/bin/rsvg-convert` after linking the layer to a Lambda function.\n\n## Download\n\nThe Lambda Layer ZIPs can be found in [Releases](https://github.com/bubblydoo/librsvg-lambda-layer/releases).\n\nIn order to use it, download one of the zips, then deploy them as follows:\n\n```bash\naws lambda publish-layer-version \\\n  --layer-name rsvg \\\n  --description \"Librsvg layer for x86_64\" \\\n  --license-info \"MIT License\" \\\n  --zip-file fileb://librsvg-lambda-layer.x86_64.zip \\\n  --compatible-architectures x86_64\n\naws lambda publish-layer-version \\\n  --layer-name rsvg-arm64 \\\n  --description \"Librsvg layer for arm64\" \\\n  --license-info \"MIT License\" \\\n  --zip-file fileb://librsvg-lambda-layer.aarch64.zip \\\n  --compatible-architectures arm64\n```\n\n## Prerequisites\n\n* Docker\n* AWS command line utilities (just for deployment)\n\n## Compilation and deployment\n\n* Clone the repository\n```bash\ngit clone github.com/bubblydoo/librsvg-lambda-layer\ncd librsvg-lambda-layer\n```\n\n* Start Docker services and build image (this might take a while)\n```bash\ndocker build . --target librsvg-layer -t amazon-linux-librsvg-layer\n# docker build . --target librsvg -t amazon-linux-librsvg\n# docker build . --target builder -t amazon-linux-librsvg-builder\n```\n\nor for a multiplatform image:\n\n```bash\ndocker buildx create --use # if you didn't make a builder yet\ndocker buildx build . --platform linux/amd64,linux/arm64 --target librsvg-layer -t amazon-linux-librsvg-layer\n```\n\n* Copy zip to ./dist\n```bash\ndocker run --platform linux/amd64 -v \"$PWD/dist\":/dist amazon-linux-librsvg-layer\ndocker run --platform linux/arm64 -v \"$PWD/dist\":/dist amazon-linux-librsvg-layer\n```\n\n* Inspect layer content\n```bash\nunzip -l dist/librsvg-layer.x86_64.zip\nunzip -l dist/librsvg-layer.aarch64.zip\n```\n\n* Deploy to AWS\n```bash\naws lambda publish-layer-version \\\n  --layer-name rsvg \\\n  --description \"Librsvg layer for x86_64\" \\\n  --license-info \"MIT License\" \\\n  --zip-file fileb://dist/librsvg-layer.x86_64.zip \\\n  --compatible-architectures x86_64\n\naws lambda publish-layer-version \\\n  --layer-name rsvg-arm64 \\\n  --description \"Librsvg layer for arm64\" \\\n  --license-info \"MIT License\" \\\n  --zip-file fileb://dist/librsvg-layer.aarch64.zip \\\n  --compatible-architectures arm64\n```\n\n### Compiled info\n\n`rsvg-convert`: version ![Version](https://img.shields.io/github/v/release/bubblydoo/librsvg-lambda-layer.svg?style=flat\u0026label=)\n\n### Caveats\n\n* Images with `xlink:href=\"file://` do not load properly. You can inline the files as a `data://` uri as a workaround.\n* Only jpeg and png builtin loaders are enabled (for usage with `data://`), but more can be enabled in `Dockerfile`\n\n## More information\n\nFor more information, check out:\n\n* https://github.com/GNOME/librsvg\n\n## Author\n\nHans Otto Wirtz \u003chttps://github.com/hansottowirtz\u003e\nGojko Adzic \u003chttps://gojko.net\u003e\n\n## License\n\n* These scripts: [MIT](https://opensource.org/licenses/MIT)\n* Rsvg: \u003chttps://github.com/GNOME/librsvg/blob/master/COPYING\u003e\n* Contained libraries all have separate licenses, check the respective web sites for more information\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubblydoo%2Flibrsvg-lambda-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbubblydoo%2Flibrsvg-lambda-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubblydoo%2Flibrsvg-lambda-layer/lists"}