Can you try with JPG? I think it may be because PNG has 4 channels, JPG will have 3. IF that is the case then you simply need to force the channels to be 3 and ignore the alpha channel for transparency on PNGs:

  
      

      js.tensorflow.org
  

  
    

TensorFlow.js 3

  A WebGL accelerated, browser based JavaScript library for training and deploying ML models


  

  
    
    
  

  


There is parameter to force it to be 3 under channels which is optional parameter you can specify.