Skip to content

How to use plugin for MagentoCmsControllerAdminhtmlWysiwygImagesThumbnail execute() function

I want to put an around plugin.

This is the core file
vendor/magento/module-cms/Controller/Adminhtml/Wysiwyg/Images/Thumbnail.php

The main purpose is on the execute function I want to upload a custom icon for WYSIWYG.

            $image = $this->_objectManager->get(MagentoFrameworkImageAdapterFactory::class)->create();
            $image->open('media/wysiwyg/test_icon.png');
            $resultRaw->setHeader('Content-Type', $image->getMimeType());
            $resultRaw->setContents($image->getImage());