Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload token images to gcs #204

Merged
merged 5 commits into from
Apr 30, 2024
Merged

feat: upload token images to gcs #204

merged 5 commits into from
Apr 30, 2024

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Apr 30, 2024

  • Changes the default image cache script to transform (via sharp) the token's original image (regardless of format) into two PNG images: full size, and thumbnail
  • Uploads the resulting images to a configurable GCS bucket
  • Adds cached_thumbnail_image values to token responses so wallets or explorers may use full size or reduced size when needed

Related to #201

TODO in future PRs: Admin RPC to recalculate image of any token, update client library

Copy link

github-actions bot commented Apr 30, 2024

Vercel deployment URL: https://token-metadata-ocm7b5jrh-blockstack.vercel.app 🚀

@rafaelcr rafaelcr marked this pull request as ready for review April 30, 2024 18:31
@rafaelcr rafaelcr requested a review from zone117x April 30, 2024 18:31
Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it would be helpful to be able to lazy process images on (first) request. But that's going to involve a bigger change, maybe not worth it unless this approach runs into problems.

LGTM!

@rafaelcr rafaelcr merged commit 1cec219 into develop Apr 30, 2024
5 checks passed
@rafaelcr rafaelcr deleted the feat/google-cdn branch April 30, 2024 20:30
blockstack-devops pushed a commit that referenced this pull request May 7, 2024
## [0.7.0-beta.1](v0.6.3...v0.7.0-beta.1) (2024-05-07)

### Features

* add admin rpc to reprocess token image cache ([#205](#205)) ([2fdcb33](2fdcb33))
* update ts client with image thumbnails ([#206](#206)) ([c24cb56](c24cb56))
* upload token images to gcs ([#204](#204)) ([1cec219](1cec219))

### Bug Fixes

* get gcs auth token dynamically for image cache ([#210](#210)) ([8434b22](8434b22))
@blockstack-devops
Copy link

🎉 This PR is included in version 0.7.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request May 13, 2024
## [0.7.0](v0.6.3...v0.7.0) (2024-05-13)

### Features

* add admin rpc to reprocess token image cache ([#205](#205)) ([2fdcb33](2fdcb33))
* update ts client with image thumbnails ([#206](#206)) ([c24cb56](c24cb56))
* upload token images to gcs ([#204](#204)) ([1cec219](1cec219))

### Bug Fixes

* get access token properly ([a6b98c5](a6b98c5))
* get gcs auth token dynamically for image cache ([#210](#210)) ([8434b22](8434b22))
* image cache agent arg types ([5826628](5826628))
* improve image cache error handling ([#214](#214)) ([115a745](115a745))
* reuse gcs token and validate image cache script errors ([#213](#213)) ([5e1af5c](5e1af5c))
@blockstack-devops
Copy link

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants