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

Support CDN #2424

Closed
nikitosing opened this issue Nov 25, 2024 · 2 comments · Fixed by #2461
Closed

Support CDN #2424

nikitosing opened this issue Nov 25, 2024 · 2 comments · Fixed by #2461
Assignees
Labels
pre-release Tasks in pre-release right now

Comments

@nikitosing
Copy link
Member

nikitosing commented Nov 25, 2024

in token instance structure will be new

  • optional field thumbnails
    it has the following structure (example with full key set, it is possible that some keys will be absent due to small image size, or impossibility to upload original image):
thumbnails: 
{
  250x250: "https://pub-1f1ac54bb1ee4b1ab5f87ca95854800c.r2.dev/eth-sepolia-testnet/cef9dc82f65e2f8117a4edf5f4dc9d85d50d3f17_250x250.png",
  500x500: "https://pub-1f1ac54bb1ee4b1ab5f87ca95854800c.r2.dev/eth-sepolia-testnet/cef9dc82f65e2f8117a4edf5f4dc9d85d50d3f17_500x500.png",
  60x60: "https://pub-1f1ac54bb1ee4b1ab5f87ca95854800c.r2.dev/eth-sepolia-testnet/cef9dc82f65e2f8117a4edf5f4dc9d85d50d3f17_60x60.png",
  original: "https://pub-1f1ac54bb1ee4b1ab5f87ca95854800c.r2.dev/eth-sepolia-testnet/cef9dc82f65e2f8117a4edf5f4dc9d85d50d3f17_original.png"
}
  • field media_url, it contains url to image OR animation (if image is miising)
    media_url: "https://d3onnejkzwg1si.cloudfront.net/640x640/wolvesnfts/3/Images/1784.png"
  • optional field media_type it shows content type of media_url in the following format: "image/png"
    media_type: "image/png"

Example:
https://eth-sepolia.k8s-dev.blockscout.com/api/v2/tokens/0x467f1c548E65bC5876b95b217dC6f0DDB801C83A/instances/2837

@nikitosing
Copy link
Member Author

Backend PR: blockscout/blockscout#10675

@tom2drum tom2drum self-assigned this Dec 10, 2024
tom2drum added a commit that referenced this issue Dec 10, 2024
@tom2drum
Copy link
Collaborator

As we discussed, we will ignore the media_type and media_url fields for now. In the future, we expect to have in API response separate media-type properties for both image_url and animation_url.

Additionally, we consider the new CDN and Helia verified fetch features to be mutually exclusive. For the CDN to work, Helia fetch should be disabled by setting NEXT_PUBLIC_HELIA_VERIFIED_FETCH_ENABLED=false.

@github-actions github-actions bot added the pre-release Tasks in pre-release right now label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre-release Tasks in pre-release right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants