hirosystems/token-metadata-api

Token Image not displaying on Hiro web extension and Xverse

Closed this issue · 29 comments

Metadata is loading correctly in the sense that it is showing the correct values:
https://api.hiro.so/metadata/ft/SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4k1pq1uv0w

{
  "name": "Ordinance",
  "symbol": "ORD",
  "decimals": 6,
  "total_supply": "1000000000000000",
  "token_uri": "https://stackswap-launchpad.s3.amazonaws.com/7ef29bcf-eae4-4e4d-bafd-54a83deb0c46.json",
  "description": "Social credits for the Ordinals community, administered by the Bureaucrats.",
  "image_uri": "http://s3-us-east-2.amazonaws.com/stackswap-launchpad/d37555bc-b4e7-47e9-b1e1-b3797467d924.png",
  "image_canonical_uri": "http://s3-us-east-2.amazonaws.com/stackswap-launchpad/d37555bc-b4e7-47e9-b1e1-b3797467d924.png",
  "tx_id": "0xf6b48220f4d23ca265e62a9f5458adbb0534081dab1cb9465fb7820023901edc",
  "sender_address": "SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275",
  "metadata": {
    "sip": 16,
    "name": "Ordinance",
    "description": "Social credits for the Ordinals community, administered by the Bureaucrats.",
    "image": "http://s3-us-east-2.amazonaws.com/stackswap-launchpad/d37555bc-b4e7-47e9-b1e1-b3797467d924.png",
    "cached_image": "http://s3-us-east-2.amazonaws.com/stackswap-launchpad/d37555bc-b4e7-47e9-b1e1-b3797467d924.png"
  }
}

However, it is still not showing correctly in Hiro web extension. However, when the broken image link is opened in a new tab via right click menu, it shows the correct link and image shows properly:

image

image

image

http://s3-us-east-2.amazonaws.com/stackswap-launchpad/d37555bc-b4e7-47e9-b1e1-b3797467d924.png

Thank you for your continued support on this @rafaelcr !

@markmhx do you think this could be a wallet issue?

One important note here is that the Token Metadata API only includes the link to the image as it was reported by the token's JSON metadata, i.e. it does not host the image in any way. This means that this could actually be an issue on the server that hosts the image (CORS or something related) that might be preventing it from displaying in a wallet context.

Is there something we can do on our end to try to configure?

@kjchiang3 do you see an error in the browser's JS console when these images appear broken?

Here's what I see just trying to get the image to load in an <img> tag on this page:

image

Mixed http/s content warning, and a content security policy error on loading. Might need to load images through a CDN. That's better privacy/security for end-users anyway.

Thanks @zone117x . @rafaelcr can I ping you here once we've moved the files over to a CDN? would something like Amazon Cloudfront work?

@rafaelcr, we've switched over to HTTPS. would you check these for us? thank you.

Having the same image issue, moved the picture to another server

Do I need to update the link in the contract? (If so how?) or is it something on your end?
CORGI Coin is the token

https://explorer.hiro.so/txid/SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4ktm1822lp?chain=mainnet

@rafaelcr the images have been moved to https on the same links, would you help us update that so we may check if it worked? thanks.

Done @kjchiang3 @MarkfrmWallie
I see the new URLs as https, can you check again?

Closing for now but feel free to reopen if you have further questions

hi @rafaelcr,

i think there might be some ones on the list that haven't been updated to HTTPS on the Hiro side, as we have a few that are showing properly and a few that aren't. Could you help us check this? Thanks. We'll keep trying the notify function as well.

https://explorer.hiro.so/txid/0x739241a21e361aa8e41f94f0241d5c2137e4ff787513682105b7c15afe3a0e35?chain=mainnet
https://stackswap-launchpad.s3.amazonaws.com/5b54d6a5-f526-4425-8e58-0d9f03baf1df.json
https://s3-us-east-2.amazonaws.com/stackswap-launchpad/148e7a7d-7222-4609-b675-f44ccdf2f762.jpg

Done @kjchiang3 👍

Thanks!
STSW is not showing up, however.
This is concerning as there is a "fake" STSW token someone has created.

Real STSW token: https://explorer.hiro.so/txid/SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.stsw-token-v4a?chain=mainnet

hi @rafaelcr, following up on this above comment. appreciate all the Hiro folks have been busy the past few weeks!

Done @kjchiang3 , sorry I missed your message!

Done @kjchiang3 , sorry I missed your message!

Very understandable 😊

My token i created on stackswap is not showing correctly. can you get a metadata update?

https://explorer.hiro.so/txid/SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4k94d8elkl?chain=mainnet

@rafaelcr could we get zani's token updated? thanks!

@zanzani123 that is because the metadata has the image url with http:// instead of https://, this creates issues for the Hiro Wallet when displaying content

Perhaps @kjchiang3 can help you here, you'll need to change that on the Stackswap side IIUC

let me update this and ping you guys back.

hi @rafaelcr could you refresh Zani's token? we also found that we had accidentally rolled back the https image upload so shouldn't see this issue going forward.

Apologies for the delay @kjchiang3 , done