magento2: Wysywig editor shows broken image icons

Preconditions

  1. Magento 2.1.7
  2. PHP 7.0

Steps to reproduce

  1. Add image in Wysywig editor

Expected result

  1. Image is shown in editor

Actual result

  1. Broken image icon
  2. Url is <img src="http://domain/path-to-magento/adminurl/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvcGRmL3BkZi5wbmcifX0,/key/e44fd2b2430f15239de43de5a10cb958615b525bb7bca920ab2865c99ff7de7d/" data-mce-src="http://domain/path-to-magento/adminurl/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvcGRmL3BkZi5wbmcifX0,/key/e44fd2b2430f15239de43de5a10cb958615b525bb7bca920ab2865c99ff7de7d/">

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I have the same issue on 2.2.0.

I experienced the same issue today and it kept me busy for a half day, but I found that at least my problem was not related to the Magento code.

One of the external extensions had a extra empty line at the beginning of the registration.php. This extra empty line was added at the beginning of the response. Which in turn made the browser not recognising the image and thus not showing it since it doesn’t start with the required bytes.

I could find the registration.php that was responsible for this error by debugging trough app/etc/NonComposerComponentRegistration.php simply put a echo $file; after include $file; if you see that the text (filenames) start on a new line you know it is the file that starts on that line.

You should join the Slack channel of Magento. Let’s fix this in the contribution day 😃

@hostep Tomorrow at MM17BE? Will show you my case.