Preview image in media manager

Hi!

I am using tinacms together with NextJs,however I encountered a problem. The icon preview in the media manager shows a generic file icon instead of the actual picture:


However if I try to use the picture it works just fine and is shown in image blocks and also on the page.

I am using a git Media store, I tried to modify to see the source of the img:

import { GitMediaStore } from '@tinacms/git-client'

export default class TinaGitMediaStore extends GitMediaStore {
async previewSrc(src) {
   console.log("...... tina preview")//this is never shown in any console why?
   return /jpg|jpeg|png|svg|gif$/.test(src.toLowerCase())
   ? src
   : null
  }
}

and the Tina instance:

cmsInstance = new TinaCMS({
apis: {
   git: client,
},
media: new TinaGitMediaStore(client),
sidebar: {
   position: 'overlay',
},
})

The Server.js

  server.use(
"/___tina",
gitApi.router({
  pathToRepo: process.cwd(),
  pathToContent: "/public",
})
  );

Do you have any suggestions how to handle the problem?
Thank you!