Get NFT Metadata by IPFS url or ARC id

How can I go about getting a NFT’s metadata, like image link, from its IPFS url or its ARC id, both of which I have. I want to retrieve this info in javascript, fetch does not work for IPFS addresses. Let me know if anyone knows how to solve this, thanks!

You need to use an IPFS gateway.
See IPFS Gateway | IPFS Docs

For example, for this ARC69 NFT: Algorand
the URL of the asset is:

and you can access it through the gateway, such as:

Important note: Public gateways need to be trusted by you: IPFS Gateway | IPFS Docs