GilbertoBotaro / image-selector-example-wp-plugin

Example how to create an image selector for a Gutenberg block in WordPress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example how to add an image selector to a Gutenberg block in WordPress

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.

Developer information

Installation

  1. Clone this repository

  2. Install Node dependencies

    $ npm install
    

Code style

Run eslint with the following command:

$ npm run lint

Compile assets

npm start

  • Use to compile and run the block in development mode.
  • Watches for any changes and reports back any errors in your code.

npm run build

  • Use to build production code for your block inside dist folder.

About

Example how to create an image selector for a Gutenberg block in WordPress


Languages

Language:JavaScript 74.3%Language:PHP 19.5%Language:CSS 6.3%