Skip to content

Commit

Permalink
Merge pull request #958 from liquality/ext-238/Ethereum-nft-ipfs-imag…
Browse files Browse the repository at this point in the history
…e-fix

Ext 238 | Ethereum nft IPFS image fix
  • Loading branch information
bradleySuira authored Dec 13, 2022
2 parents 282582b + 3cfb9c9 commit 0e16aeb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/Details/NFTAssetDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
<div class="nft-img">
<img
ref="nftImage"
:src="nftAsset?.image_original_url || nftAsset?.image_preview_url || thumbnailImage"
:src="
assetOriginalImageUrl(nftAsset?.image_original_url) ||
nftAsset?.image_preview_url ||
thumbnailImage
"
:alt="nftAsset?.name || 'NFT Asset'"
@error="imageError('nftImage')"
/>
Expand Down Expand Up @@ -331,6 +335,9 @@ export default {
if (ref) {
this.$refs[ref].src = this.thumbnailImage
}
},
assetOriginalImageUrl(url) {
return url.replace('ipfs://', 'https://ipfs.io/ipfs/')
}
}
}
Expand Down

0 comments on commit 0e16aeb

Please sign in to comment.