{"id":19052333,"url":"https://github.com/phuurl/img-site","last_synced_at":"2026-05-14T20:03:25.510Z","repository":{"id":40662012,"uuid":"457557820","full_name":"Phuurl/img-site","owner":"Phuurl","description":"Image hosting site for screencaps etc - generates static pages for serverless AWS hosting from image uploads","archived":false,"fork":false,"pushed_at":"2023-11-11T19:34:23.000Z","size":28,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T07:42:32.808Z","etag":null,"topics":["aws","cloudfront","go","lambda","s3","sam","serverless"],"latest_commit_sha":null,"homepage":"https://dp97yldgoy09a.cloudfront.net/5c2019ea-7a03-42d0-a750-290651a83222/","language":"Go","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/Phuurl.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":"2022-02-09T23:06:34.000Z","updated_at":"2022-05-02T05:47:40.000Z","dependencies_parsed_at":"2024-06-20T00:03:47.330Z","dependency_job_id":"37474dfb-c4f9-4c57-a9bc-cd6a1c4e8e0d","html_url":"https://github.com/Phuurl/img-site","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"3dbf12ca4291100a441247c481ea60e0a9177413"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Phuurl/img-site","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phuurl%2Fimg-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phuurl%2Fimg-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phuurl%2Fimg-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phuurl%2Fimg-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Phuurl","download_url":"https://codeload.github.com/Phuurl/img-site/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phuurl%2Fimg-site/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33041205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["aws","cloudfront","go","lambda","s3","sam","serverless"],"created_at":"2024-11-08T23:21:56.398Z","updated_at":"2026-05-14T20:03:25.492Z","avatar_url":"https://github.com/Phuurl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# img-site\nThe creatively named `img-site` project is a serverless static image hosting site using AWS - you upload images to an input S3 bucket, and static web pages presenting them are generated and served through CloudFront over HTTPS.\n\nGenerated pages also include tags to enable media previews on major social networks such as Twitter, Discord, Slack, and anywhere else that supports [OpenGraph](https://ogp.me/).\n\nYou can see an example [here](https://dp97yldgoy09a.cloudfront.net/5c2019ea-7a03-42d0-a750-290651a83222/), or see below for more details and deployment instructions.\n\n## Diagram\n```\n┌────► Uploader             ┌───────────────┐  Access  ┌────────────┐\n│          │                │               │  logs    │            │\n│          │                │ LoggingBucket │◄─────────┤ CloudFront │◄─────── Viewer\n│          │                │               │          │            │\n│          │ Image          └───────────────┘          └────────────┘\n│          │ upload                                           ▲\n│          │                                                  │\n│          │                                                  │\n│          ▼                                                  ▼\n│  ┌──────────────┐        ┌────────────────┐         ┌───────────────┐\n│  │              │        │                │         │               │\n│  │ UploadBucket ├───────►│ IngestFunction ├────────►│ HostingBucket │\n│  │              │        │                ├───┐     │               │\n│  └──────────────┘        └────────────────┘   │     └───────────────┘\n│                           Generate HTML       └────┐\n│                           Upload to HostingBucket  │\n│                           Send SNS notification    │\n│                                                    │\n└────────────────────────────────────────────────────┘\n      SNS email notification with generated link\n```\n\n## Parameters\n\n| Parameter                        | Description                                                                                                                                    | Example                                                     |\n|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|\n| `UploadBucketName`               | Name of the upload S3 bucket to create                                                                                                         | `img-bucket-name`                                           |\n| `EmailNotificationEnabled`       | Whether to enable email notification on image processing completion - `true` or `false`                                                        | `true`                                                      |\n| `NotificationEmail`              | Email address to notify on processing completion                                                                                               | `someone@example.com`                                       |\n| `SiteName`                       | Name for site - used in HTML template for title                                                                                                | `CoolImages`                                                |\n| `NoDomain`                       | If `true`, a custom domain and certificate is not attached to the CloudFront distribution - useful for testing purposes                        | `false`                                                     |\n| `Domain`                         | Domain name that the image site will be hosted on (ignored if `NoDomain` is `true`)                                                            | `img.example.com`                                           |\n| `CertArn`                        | ARN of the ACM certificate to use with the CloudFront distribution (ignored if `NoDomain` is `true`) - note: must be in the `us-east-1` region | `arn:aws:acm:us-east-1:0123456789:certificate/abc-1234-def` |\n| `CreateUploadIamUser`            | Whether to create an IAM user for upload to the ingest bucket - user created if `true`                                                         | `false`                                                     |\n| `CloudFrontRedirectFunctionName` | Name for the CloudFront redirect function - can leave as default unless you're deploying multiple copies of this stack                         | `img_site_folder_index_redirect`                            |\n| `CloudFrontCachePolicyName`      | Name for the CloudFront cache policy - can leave as default unless you're deploying multiple copies of this stack                              | `img-site-cache-policy`                                     |\n\n## Deploy\n```shell\n# Build and deploy SAM stack\nsam build --use-container\nsam deploy --guided\n\n# Now upload error.html and robots.txt to the deployed HostingBucket\naws s3 cp error.html robots.txt s3://\u003cname of HostingBucket\u003e/\n```\n\nOnce the stack is deployed, you can then add the appropriate DNS (eg Route 53) entries for your domain to point it at the created CloudFront distribution (assuming `NoDomain` is `false`).\n\nYou can then upload images to the UploadBucket for processing, and will receive email notifications (assuming `EmailNotificationEnabled` is `true`) once complete with a link to the generated static page on your img-site.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuurl%2Fimg-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphuurl%2Fimg-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuurl%2Fimg-site/lists"}