Skip to main content
Solved

Why is my PNG image not working inside plugin?

  • April 16, 2022
  • 1 reply
  • 1420 views

Saifylis

Given below is how I’ve coded a simple import of a png image and rendering it inside my Figma plugin:

const img = require('../../assets/hola.png');

const Welcome = () => (
    <>
         <img src={img} height={42} width={42} alt="Wordtract"/>
    </>
)

However, the following is the output:

Screenshot 2022-04-17 at 2.53.10 AM

There aren’t any console errors. Please help me out solving this. Cheers!

Best answer by Gleb

View original

1 reply

Gleb
  • Power Member
  • 4708 replies
  • Answer
  • April 17, 2022

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings