We need to install url-loader and file-loader html-webpack-plugin npm packages first Now add this configuration to your webpack.config.js Now you can add an image inside src/images directory. Then import it as any name you like in this case ProfileIcon. And then pass it in the images source in your component. It will look like this
Attributes and Components in Gutenberg Blocks | RichText | BlockControls | AlignmentToolbar
Posted onIn the previous blog, we learned about how edit and save functions work. They describe the structure of the block’s appearance. However, they only returned simple paragraphs. In this blog, we will learn about how the block’s structure can be changed when the user changes a block State of a block: To achieve dynamic change in the block’s structure when