0

We have created SPFx with React project. We have used SPFx version 1.21.1

We have created one component to that project. Below is the code for the same,

import * as React from 'react'
 
const Administration = () => {
    return (
        <div>
            <img src={require("../../webparts/contosoProject/assets/image/download.jpg")} />
        </div>
    )
}
 
export default Administration

We tried running gulp serve, but the image did not load. Please refer to the screenshot below for further clarification.

enter image description here

Can anyone help us with the same?

Thank you in Advance.

1
  • Should be working fine. Do you see any build errors (like "file not found")? Commented Jul 23 at 0:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.