Metadata not loading

Stuck on a struggle street. Desperate for directions.

I create contract for ERC721 token using OpenZeppelin WIzzard tool.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract Gowno is ERC721, Ownable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;

    constructor() ERC721("gowno", "gwo") {}

    function _baseURI() internal pure override returns (string memory) {
        return "https://ipfs.io/ipfs/QmZqFf56R8F89QWzosWGwC6oUxLKT45R3ZBjBQjdxZacdM/";
    }

    function safeMint(address to) public onlyOwner {
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }
}

I Upload image onto IPFS service.


I created basic metadata with image URI and Upload to IPFS.

{
  "name": "TesterTestTester #1",
  "description": "This is one of dosens attempts tofigure out wtf i cant make a singlenft, enjoy",
  "image": "ipfs://QmXMQyv2K4xgiw8Gz1jBESXE91UQxmL1qmGdwAEkeZTg4B/1.jpg",
  "edition": 1
}

No image, no description shows on opensea. I dont know if you can go more basic than that. I am trying to just make a simple proof of concept to move on with my portfolio project, but i am stuck. Cant move on and getting frustrated. If someone could take a look and maybe write a word what could be an issue here i would greatly appreciate that .

Hey Sobek888,

Welcome to the community!

Since what you have inside the IPFS is a json file, you will need to override the tokenURI function as well.
Try this as your code replacing _baseURI() and tokenURI

function _baseURI() internal pure override returns (string memory) {
        return "ipfs://QmZqFf56R8F89QWzosWGwC6oUxLKT45R3ZBjBQjdxZacdM/";
}

function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(),".json")) : "";
 }

Thank you and thank you for your quick response. It seems to be a problem to compile the code, to be precise tokenId.toString() line. I took away .toString and minted but still the same problem. My guess was that the json file maybe is written with errors? since it doesnt display anything even the description and i tested the debugger link provided by openSea and it doesnt seems to see the file. Url leading to the file also seems to be fine but somehow never loads. Im lost