magento2: Wysywig editor shows broken image icons
Preconditions
- Magento 2.1.7
- PHP 7.0
Steps to reproduce
- Add image in Wysywig editor
Expected result
- Image is shown in editor
Actual result
- Broken image icon
- 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
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.phpsimply put aecho $file;afterinclude $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.