This is a WordPress plugin which shows how to add an image selector to a Gutenberg block in WordPress. This blog post explains how it works: https://www.liip.ch/en/blog/add-an-image-selector-to-a-gutenberg-block
Feel free to use this plugin as a starting point to create an image selector in your WordPress project.
-
Clone this repository
-
Install Node dependencies
$ npm install
Run eslint with the following command:
$ npm run lint
- Use to compile and run the block in development mode.
- Watches for any changes and reports back any errors in your code.
- Use to build production code for your block inside
dist
folder.