kodadot / nft-gallery

Generative Art Marketplace
https://koda.art
MIT License
639 stars 362 forks source link

Previews: Some previews on Twitter are not working #10680

Closed JustLuuuu closed 3 months ago

JustLuuuu commented 3 months ago

This status check: https://x.com/Just_Luuuu/status/1815655588535095566 Some previews work just fine, and others do not. It's weird because NFT from the same collection works in some cases and in others not. Does anyone know why?

Screenshot 2024-07-23 at 19 45 18 Screenshot 2024-07-23 at 19 45 25 Screenshot 2024-07-23 at 19 44 58
roiLeo commented 3 months ago

Non-working example

For: /ahp/gallery/112-2407783094, Image not found

title: Convergente #191

image: https://imagedelivery.net/jk5b6spi_m_-9qC4VTnjpg/https---fxart-beta-kodadot-workers-dev-metadata-v2-image-chain-ahp-collection-112-hash-0x4d9fac5dc90d70d79ceac3589bb998755cf60ab2ff110225b2bffe4b0c0e4742/small

price: 0 DOT

usd: 0.00

network: Polkadot AssetHub
Convergente #191
{ "id": "112-2407783094", "createdAt": "2024-07-22T09:31:06.000000Z", "name": "Convergente #191", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=112&hash=0x4d9fac5dc90d70d79ceac3589bb998755cf60ab2ff110225b2bffe4b0c0e4742", "metadata": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=112&sn=191", "currentOwner": "136iXSRMQrsuFs26QAGX4eQHt8HYgX8J3nWQhjA1rhNMo53p", "issuer": "15CoYMEnJhhWHvdEPXDuTBnZKXwrJzMQdcMwcHGsVx5kXYvW", "meta": { "id": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=112&sn=191", "name": "Convergente #191", "description": "Artist: [Eduxdux](https://twitter.com/eduxdux_) \n\n\n 'Convergente' embodies the concept of balance between autonomy and interdependence. Distinct lines and shapes follow their individual paths, yet they come together in a unified field, suggesting that unity is not uniformity, but rather the cohesion of diverse forces and directions. The piece stands as a visual metaphor for interconnectedness, asserting that the whole is indeed greater than the sum of its parts.", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=112&hash=0x4d9fac5dc90d70d79ceac3589bb998755cf60ab2ff110225b2bffe4b0c0e4742", "animationUrl": "ipfs://bafybeidgp2ymjak4fp4akmaujdvelbzbxlh4y2iym5s7t3zutr7r6nzg44/?hash=0x4d9fac5dc90d70d79ceac3589bb998755cf60ab2ff110225b2bffe4b0c0e4742", "type": "text/html" }, "price": "0" }

For: /ahp/gallery/127-2407139295, same

title: .hdd #227

image: https://imagedelivery.net/jk5b6spi_m_-9qC4VTnjpg/https---fxart-beta-kodadot-workers-dev-metadata-v2-image-chain-ahp-collection-127-hash-0x34cd011fb1568e071d2a236148b9e182131143ef307420f5e9e63fd14d0103d4/small

price: 0 DOT

usd: 0.00

network: Polkadot AssetHub
.hdd #227
{ "id": "127-2407139295", "createdAt": "2024-07-23T17:27:06.000000Z", "name": ".hdd #227", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=127&hash=0x34cd011fb1568e071d2a236148b9e182131143ef307420f5e9e63fd14d0103d4", "metadata": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=127&sn=227", "currentOwner": "12auQ2MnukZEZcjQcKQcygRXerebcUuG5kvy2R95rYaUCcuR", "issuer": "1NFfEH3yspdEgLnhZ5QWgb7B2z5LNCAE3HUo5nDxF5MqTcj", "meta": { "id": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=127&sn=227", "name": ".hdd #227", "description": "Artist: [@dotconatus](https://twitter.com/dotconatus) \n\n .hdd is a series of generative art inspired by PC components, following in the footsteps of .motherboard and .cpu. It visualizes the arrangement of data written to the disk using the Fibonacci sequence. By incorporating prime numbers and altering shades of colors over time, it portrays the movement of data and the disk's rotation. \n\n The variation in data is determined by segmenting the Fibonacci sequence using n-adic numbers. It is governed entirely by the intriguing rules of prime numbers and the Fibonacci sequence, with no randomness involved. After selecting n from 49 types of composite numbers and 77 types of prime numbers, a randomly chosen initial term is added to determine the starting position of the rotation. \n\n May you find yourself captivated by the elegance of prime numbers and the Fibonacci sequence. \n\n Generative art by .conatus \n\n Created in JavaScript with p5.js. \n\n Code License: CC BY-NC-SA 4.", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=127&hash=0x34cd011fb1568e071d2a236148b9e182131143ef307420f5e9e63fd14d0103d4", "animationUrl": "ipfs://bafybeie43uwqp4zqt7tsst73oek7zg5r6t3ssthhybhakof6e2hwyy7zdq/?hash=0x34cd011fb1568e071d2a236148b9e182131143ef307420f5e9e63fd14d0103d4", "type": "text/html" }, "price": "0" }

Working example

For: /ahp/gallery/166-2407556444

title: Ezop #38

image: https://imagedelivery.net/jk5b6spi_m_-9qC4VTnjpg/https---fxart-beta-kodadot-workers-dev-metadata-v2-image-chain-ahp-collection-166-hash-0xd67d834462ca31eaef1f30157e31659f60355143b7441e6fc7d9eae1fa79f3f8/small

price: 0 DOT

usd: 0.00

network: Polkadot AssetHub
Ezop #38
{ "id": "166-2407556444", "createdAt": "2024-07-23T18:44:30.000000Z", "name": "Ezop #38", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=166&hash=0xd67d834462ca31eaef1f30157e31659f60355143b7441e6fc7d9eae1fa79f3f8", "metadata": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=166&sn=38", "currentOwner": "13dLY5aynbYDCy1DxQYQGjd4yy5uSeVtA4pLdR7SrcxZyvT1", "issuer": "1NFfEH3yspdEgLnhZ5QWgb7B2z5LNCAE3HUo5nDxF5MqTcj", "meta": { "id": "https://fxart-beta.kodadot.workers.dev/metadata/v2/json?chain=ahp&collection=166&sn=38", "name": "Ezop #38", "description": "Artist: [dist.cs](https://twitter.com/dist_cs) \n\n Ezop utilizes particle systems to transform intricate and detailed abstract landscapes. Each piece is created entirely from circles of various dimensions, forming complex, synchronized, and unsynchronized patterns. Viewers can observe the rendering process, witnessing how countless simple shapes like circles come together to form something recognizable and evocative. Inspired by Aesop's fables, the collection invites viewers to discover their own stories within the artwork as circles evolve into unique, evocative sceneries.", "image": "https://fxart-beta.kodadot.workers.dev/metadata/v2/image?chain=ahp&collection=166&hash=0xd67d834462ca31eaef1f30157e31659f60355143b7441e6fc7d9eae1fa79f3f8", "animationUrl": "ipfs://bafybeih5nk5zjkvpw5z3j2qapcbofptph4sqbovh7mytrvgf5tn3apirce/?hash=0xd67d834462ca31eaef1f30157e31659f60355143b7441e6fc7d9eae1fa79f3f8", "type": "text/html" }, "price": "0" }

edit: All works if returning rawImage instead of imagedelivery endpoint

preschian commented 3 months ago

should be fixed: https://github.com/kodadot/workers/pull/320

but it didn't reflect immediately. since twitter cache opengraph results: https://developer.x.com/en/docs/twitter-for-websites/cards/guides/troubleshooting-cards#refreshing The Twitter web crawler re-indexes the Card tag information on your page roughly every seven days.

feel free to open again if you still facing similar issue in new tweet