dlambauer/magento2-module-backend-widget-imageupload 1.0.0

Simply add Image to your Widget

Type

magento2-module

License

GPL-3.0

Requires
Requires (dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Magento2-Widget-ImageUpload

Introduction

This module provides a simple Image Uploader for Widgets based on the Gist from @cedricblondeau.

alt text

Installation

composer require dlambauer/magento2-module-backend-widget-imageupload

Add an Image

To add an Image, you have to add a parameter like this in your widget.xml:

<parameter name="insert_a_meaningfull_name" xsi:type="block" required="true" visible="true" sort_order="10">
    <label translate="true">Insert a Label here</label>
    <description translate="true">Add a great Description</description>

    <block class="Dlambauer\WidgetImageUpload\Block\Adminhtml\Widget\ImageChooser">
        <data>
            <item name="button" xsi:type="array">
                <item name="open" xsi:type="string">Choose Image...</item>
            </item>
        </data>
    </block>
</parameter>

ToDo

  • Add Unit and Integration Tests

Requirements

  • PHP >= 5.5.0

Support

If you encounter any problems or bugs, please create an issue on GitHub.

Contribution

Any contribution to the development of this Module is highly welcome. The best possibility to provide any code is to open a pull request on GitHub.

Licence

GNU General Public License, version 3 (GPLv3)

Copyright

(c) 2015 David Lambauer